/* Locker Rental Frontend Styles */

/* Container and Layout */
.locker-rental-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
}

/* Location Selector */
.location-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.location-selector h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.location-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background: white;
}

/* Location Info */
.location-info {
    margin-bottom: 30px;
    text-align: center;
}

.location-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.location-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Locker Grid Container */
.locker-grid-container {
    margin-bottom: 40px;
}

.locker-grid-container h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #2c3e50;
}

/* Legend */
.locker-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.legend-color.available {
    background: #28a745;
}

.legend-color.occupied {
    background: #dc3545;
}

.legend-color.held {
    background: #ffc107;
}

.legend-color.maintenance {
    background: #6c757d;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Locker Grid */
.locker-rental-grid {
    display: grid;
    gap: 2px;
    padding: 20px;
    background: #e9ecef;
    border-radius: 8px;
    max-width: 100%;
    overflow-x: auto;
    margin: 0 auto;
}

.locker-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.locker-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Locker States */
.locker-available {
    background: #d4edda;
    border-color: #28a745;
    cursor: pointer;
}

.locker-available:hover {
    background: #c3e6cb;
    border-color: #1e7e34;
}

.locker-occupied {
    background: #f8d7da;
    border-color: #dc3545;
    cursor: not-allowed;
}

.locker-held {
    background: #fff3cd;
    border-color: #ffc107;
    cursor: not-allowed;
}

.locker-maintenance,
.locker-disabled {
    background: #e2e3e5;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

.locker-selected {
    background: #cce5ff !important;
    border-color: #007cba !important;
    transform: scale(1.05);
    z-index: 10;
}

/* Locker Content */
.locker-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    justify-content: center;
}

.locker-number {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
}

.locker-price {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.locker-status {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.locker-select-btn {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
    transition: background 0.2s ease;
}

.locker-select-btn:hover {
    background: #005a87;
}

.locker-availability-time {
    font-size: 10px;
    color: #666;
    font-style: italic;
}

/* Reservation Form */
.reservation-form-container {
    margin-top: 40px;
}

.locker-rental-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-step {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-step h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
}

.duration-selector {
    margin-bottom: 30px;
}

.duration-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.duration-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background: white;
}

.price-display {


    .selected-locker-info {
        margin-bottom: 10px;
        font-size: 16px;
    }

    .total-price {
        font-size: 20px;
        text-align: center;
        color: #2c3e50;
    }

    /* Form Groups */
    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        display: block;
        margin-bottom: 6px;
        font-weight: 600;
        color: #2c3e50;
    }

    .form-group input {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #ccc;
        border-radius: 5px;
        font-size: 16px;
        transition: border-color 0.2s ease;
    }

    .form-group input:focus {
        outline: none;
        border-color: #007cba;
        box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    }

    /* Form Actions */
    .form-actions {
        display: flex;
        gap: 15px;
        justify-content: space-between;
        margin-top: 30px;
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        border: none;
        border-radius: 5px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s ease;
        min-height: 48px;
    }

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .btn-primary {
        background: #007cba;
        color: white;
    }

    .btn-primary:hover:not(:disabled) {
        background: #005a87;
    }

    .btn-secondary {
        background: #6c757d;
        color: white;
    }

    .btn-secondary:hover:not(:disabled) {
        background: #545b62;
    }

    .btn-danger {
        background: #dc3545;
        color: white;
    }

    .btn-danger:hover:not(:disabled) {
        background: #c82333;
    }

    /* Reservation Summary */
    .reservation-summary {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        padding: 20px;
        margin-bottom: 25px;
    }

    .reservation-summary h4 {
        margin: 0 0 15px 0;
        font-size: 18px;
        color: #2c3e50;
    }

    .summary-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
        font-size: 16px;
    }

    .summary-item:last-child {
        margin-bottom: 0;
        padding-top: 8px;
        border-top: 1px solid #dee2e6;
        font-weight: 700;
        font-size: 18px;
    }

    /* Payment Element */
    #payment-element {
        margin-bottom: 25px;
    }

    /* Hold Timer */
    .hold-timer {
        position: fixed;
        top: 20px;
        right: 20px;
        background: #fff3cd;
        border: 1px solid #ffc107;
        border-radius: 6px;
        padding: 15px 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        animation: slideInRight 0.3s ease;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }

    .timer-content {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        font-weight: 600;
    }

    .timer-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .timer-icon svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
    }

    #timer-display {
        color: #856404;
        font-family: monospace;
        font-size: 16px;
    }

    /* Messages */
    .messages-container {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        width: 90%;
        max-width: 500px;
    }

    .message {
        padding: 15px 20px;
        margin-bottom: 10px;
        border-radius: 6px;
        font-weight: 500;
        animation: slideInDown 0.3s ease;
    }

    @keyframes slideInDown {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

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

    .message.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f1b0b7;
    }

    .message.warning {
        background: #fff3cd;
        color: #856404;
        border: 1px solid #ffeaa7;
    }

    .message.info {
        background: #cce5ff;
        color: #004085;
        border: 1px solid #7db3d3;
    }

    /* Status Pages */
    .locker-rental-status {
        max-width: 600px;
        margin: 0 auto;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 30px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .status-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #dee2e6;
    }

    .status-header h3 {
        margin: 0;
        font-size: 24px;
        color: #2c3e50;
    }

    .status-badge {
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
    }

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

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

    .status-active {
        background: #cce5ff;
        color: #004085;
    }

    .status-completed {
        background: #e2e3e5;
        color: #383d41;
    }

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

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

    .reservation-details,
    .payment-details {
        margin-bottom: 25px;
    }

    .detail-group {
        display: flex;
        justify-content: space-between;
        margin-bottom: 12px;
        padding: 8px 0;
        border-bottom: 1px solid #f1f3f4;
    }

    .detail-group:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .access-code {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 6px;
        border: 2px solid #28a745;
    }

    .access-code-display {
        font-family: monospace;
        font-size: 24px;
        font-weight: 700;
        color: #28a745;
    }

    /* Error States */
    .locker-rental-error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f1b0b7;
        border-radius: 6px;
        padding: 20px;
        text-align: center;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        .locker-rental-app {
            padding: 15px;
        }

        .locker-rental-grid {
            padding: 10px;
            gap: 1px;
        }

        .locker-item {
            min-height: 60px;
            padding: 8px;
        }

        .locker-number {
            font-size: 14px;
        }

        .locker-price {
            font-size: 10px;
        }

        .locker-rental-form {
            padding: 20px;
        }

        .form-actions {
            flex-direction: column;
        }

        .btn {
            width: 100%;
        }

        .hold-timer {
            position: relative;
            top: auto;
            right: auto;
            margin-bottom: 20px;
        }

        .legend-item {
            font-size: 12px;
        }

        .status-header {
            flex-direction: column;
            gap: 15px;
            text-align: center;
        }

        .detail-group {
            flex-direction: column;
            gap: 5px;
        }
    }