/* Simple Reservations - Frontend Styles */

.sr-reservation-form-wrap {
    max-width: 500px;
    margin: 0 auto;
}

.sr-reservation-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sr-form-row {
    margin-bottom: 20px;
}

.sr-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.sr-form-row label .required {
    color: #e74c3c;
}

.sr-form-row input[type="text"],
.sr-form-row input[type="email"],
.sr-form-row input[type="tel"],
.sr-form-row input[type="date"],
.sr-form-row select,
.sr-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.sr-form-row input:focus,
.sr-form-row select:focus,
.sr-form-row textarea:focus {
    outline: none;
    border-color: #3498db;
}

.sr-form-row-half {
    display: flex;
    gap: 15px;
}

.sr-form-row-half .sr-form-col {
    flex: 1;
}

.sr-submit-btn {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.sr-submit-btn:hover {
    background: #2980b9;
}

.sr-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.sr-form-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.sr-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sr-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Reservation List & My Reservations */
.sr-reservation-list,
.sr-my-reservations {
    overflow-x: auto;
}

.sr-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sr-table th,
.sr-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.sr-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.sr-table tr:hover {
    background: #f8f9fa;
}

/* Status badges */
.sr-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.sr-status-pending {
    background: #fff3cd;
    color: #856404;
}

.sr-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.sr-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.sr-no-reservations,
.sr-login-required {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

.sr-user-cancel-btn {
    color: #e74c3c;
    text-decoration: none;
}

.sr-user-cancel-btn:hover {
    text-decoration: underline;
}

/* Item badges in reservation list */
.sr-item-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #2980b9;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin: 2px;
}

/* Loading spinner */
.sr-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: sr-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes sr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Rental Items Section */
.sr-rental-items-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.sr-rental-items-note {
    font-size: 13px;
    color: #666;
    margin: 0 0 15px 0;
}

.sr-rental-items-list {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.sr-rental-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.sr-rental-item:last-child {
    border-bottom: none;
}

.sr-rental-item:hover {
    background: #f8f9fa;
}

.sr-rental-item.sr-item-unavailable {
    background: #f5f5f5;
    opacity: 0.6;
}

.sr-rental-item-info {
    flex: 1;
    min-width: 0;
}

.sr-rental-item-name {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.sr-rental-item-desc {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-rental-item-availability {
    display: block;
    font-size: 12px;
    color: #888;
}

.sr-available-count {
    font-weight: 600;
    color: #27ae60;
}

.sr-item-unavailable .sr-available-count {
    color: #e74c3c;
}

/* Visual feedback when item is added via external link */
.sr-rental-item.sr-item-added {
    background: #d4edda;
    transition: background-color 0.3s;
}

.sr-rental-item.sr-item-unavailable-flash {
    background: #f8d7da;
    transition: background-color 0.2s;
}

.sr-rental-item-qty {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 15px;
}

.sr-qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #333;
}

.sr-qty-btn:hover {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

.sr-qty-btn:active {
    transform: scale(0.95);
}

.sr-qty-input {
    width: 50px !important;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    padding: 0 !important;
    -moz-appearance: textfield;
}

.sr-qty-input::-webkit-outer-spin-button,
.sr-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .sr-reservation-form {
        padding: 20px;
    }

    .sr-form-row-half {
        flex-direction: column;
        gap: 0;
    }

    .sr-table th,
    .sr-table td {
        padding: 8px 10px;
        font-size: 14px;
    }

    .sr-rental-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sr-rental-item-qty {
        margin-left: 0;
        justify-content: flex-end;
    }

    .sr-rental-item-desc {
        white-space: normal;
    }
}

/* =====================================================
   RENTAL MODAL STYLES
   ===================================================== */

.sr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.sr-modal-container {
    position: relative;
    width: 95%;
    max-width: 650px;
    max-height: 90vh;
    background: #f0f4ff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: sr-modal-slide-in 0.3s ease;
}

@keyframes sr-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.sr-modal-header {
    position: relative;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.sr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sr-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sr-modal-item-name {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
}

.sr-modal-item-price {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Modal Body */
.sr-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    margin-top: -15px;
}

/* Progress Steps */
.sr-modal-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.sr-step {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sr-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.sr-step-active .sr-step-number {
    background: #6366f1;
    color: #fff;
}

.sr-step-completed .sr-step-number {
    background: #22c55e;
    color: #fff;
}

.sr-step-label {
    font-size: 14px;
    color: #666;
}

.sr-step-active .sr-step-label {
    color: #333;
    font-weight: 600;
}

.sr-step-line {
    width: 80px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 15px;
}

/* Step Content */
.sr-modal-step-content h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.sr-step-subtitle {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
}

/* Date Picker */
.sr-date-picker-section {
    margin-bottom: 25px;
}

.sr-date-picker-section label,
.sr-time-section label,
.sr-quantity-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.sr-date-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.sr-date-icon {
    padding: 12px 15px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
}

.sr-date-input-wrap input[type="date"] {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    outline: none;
}

/* Available Dates Grid */
.sr-available-dates-section {
    margin-bottom: 25px;
}

.sr-available-dates-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.sr-available-dates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sr-date-card {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.sr-date-card:hover {
    border-color: #6366f1;
    background: #f5f5ff;
}

.sr-date-card.sr-date-selected {
    border-color: #6366f1;
    background: #6366f1;
    color: #fff;
}

.sr-date-card-day {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
}

.sr-date-card-weekday {
    font-size: 12px;
    opacity: 0.7;
}

.sr-date-card.sr-date-unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Time Section */
.sr-time-section {
    margin-bottom: 25px;
}

.sr-time-section select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
}

/* Quantity Section */
.sr-quantity-section {
    margin-bottom: 20px;
}

.sr-modal-qty-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sr-modal-qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sr-modal-qty-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.sr-modal-qty-wrap input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
}

.sr-modal-available-text {
    font-size: 13px;
    color: #666;
}

/* Form Rows (Step 2) */
.sr-modal-form-row {
    margin-bottom: 18px;
}

.sr-modal-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.sr-modal-form-row label .required {
    color: #ef4444;
}

.sr-modal-form-row input,
.sr-modal-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.sr-modal-form-row input:focus,
.sr-modal-form-row textarea:focus {
    outline: none;
    border-color: #6366f1;
}

/* Summary Box */
.sr-modal-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.sr-modal-summary h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.sr-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.sr-summary-row:last-child {
    border-bottom: none;
}

.sr-summary-row span:first-child {
    color: #666;
}

.sr-summary-row span:last-child {
    font-weight: 600;
    color: #333;
}

/* Success State */
.sr-success-icon {
    width: 80px;
    height: 80px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

#sr-step-success {
    text-align: center;
    padding: 40px 20px;
}

#sr-step-success h3 {
    color: #22c55e;
}

.sr-success-message {
    color: #666;
}

/* Modal Footer */
.sr-modal-footer {
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.sr-modal-btn {
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sr-modal-btn-back {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
}

.sr-modal-btn-back:hover {
    background: #f5f5f5;
}

.sr-modal-btn-next {
    background: #6366f1;
    border: none;
    color: #fff;
    margin-left: auto;
}

.sr-modal-btn-next:hover {
    background: #4f46e5;
}

.sr-modal-btn-next:disabled {
    background: #c7c7c7;
    cursor: not-allowed;
}

/* Modal Loading State */
.sr-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.sr-modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: sr-spin 1s linear infinite;
}

/* Payment Step Styles */
.sr-payment-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.sr-payment-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
}

.sr-payment-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
}

.sr-payment-amount {
    color: #6366f1;
}

.sr-stripe-element-wrap {
    margin-bottom: 20px;
}

.sr-stripe-element-wrap label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.sr-card-element {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s;
}

.sr-card-element.StripeElement--focus {
    border-color: #6366f1;
}

.sr-card-element.StripeElement--invalid {
    border-color: #ef4444;
}

.sr-card-errors {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

.sr-payment-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-top: 20px;
}

.sr-lock-icon {
    font-size: 16px;
}

.sr-payment-confirmed {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
}

/* Processing overlay */
.sr-modal-processing {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 20px;
}

.sr-modal-processing .sr-modal-spinner {
    width: 50px;
    height: 50px;
    border-width: 4px;
    margin-bottom: 15px;
}

.sr-modal-processing p {
    font-size: 16px;
    color: #333;
}

/* Responsive */
@media (max-width: 600px) {
    .sr-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .sr-modal-body {
        border-radius: 20px 20px 0 0;
    }

    .sr-available-dates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sr-modal-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sr-step-line {
        display: none;
    }

    .sr-modal-footer {
        flex-direction: column;
    }

    .sr-modal-btn {
        width: 100%;
    }

    .sr-modal-btn-next {
        margin-left: 0;
        order: -1;
    }
}
