/**
 * Wheelsys Reservation Lookup Styles
 */

/* Container */
.wheelsys-reservation-lookup {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.reservation-lookup-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.lookup-title {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.lookup-description {
    margin: 0 0 32px 0;
    font-size: 15px;
    color: #666;
    text-align: center;
    line-height: 1.6;
}

/* Form */
.reservation-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

.input-wrapper input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--wheelsys-primary-color);
    box-shadow: 0 0 0 3px rgba(239, 52, 63, 0.1);
}

.input-wrapper input::placeholder {
    color: #999;
}

.btn-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--wheelsys-primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-search:hover {
    background: #d63845;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 52, 63, 0.3);
}

.btn-search:active {
    transform: translateY(0);
}

.btn-search svg {
    width: 20px;
    height: 20px;
}

/* Messages */
.form-message {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

.form-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.form-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 2000000;
    /* Higher than modals */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--wheelsys-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Order Modal */
.wheelsys-order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wheelsys-order-modal.active {
    display: flex;
}

.order-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.order-modal-content {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.order-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10001;
}

.order-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.order-modal-close svg {
    color: #666;
}

.order-modal-body {
    padding: 40px;
    overflow-y: auto;
}

/* Order Summary */
.order-summary {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.order-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.order-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.order-irn {
    display: inline-block;
    background: #e7f3ff;
    color: #007bff;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.order-details {
    display: grid;
    gap: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.detail-value {
    color: #333;
    font-size: 14px;
    text-align: right;
}

.order-total {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total .detail-label {
    font-size: 16px;
    color: #333;
}

.order-total .detail-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--wheelsys-primary-color);
}

.order-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

.btn-action {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-refund:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-change {
    background: #007bff;
    color: white;
}

.btn-change:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-action.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    color: #666 !important;
}

.btn-action.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Refund Info */
.refund-info {
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 2px solid;
}

.refund-info.eligible {
    background: #e7f5e7;
    border-color: #28a745;
    color: #155724;
}

.refund-info.not-eligible {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.refund-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 15px;
}

.refund-info-header svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.refund-amount {
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0;
    color: inherit;
}

.refund-reason {
    font-size: 14px;
    line-height: 1.5;
    color: inherit;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Responsive */
@media (max-width: 768px) {
    .reservation-lookup-container {
        padding: 24px;
    }

    .lookup-title {
        font-size: 24px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
    }

    .order-modal-body {
        padding: 24px;
    }

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

    .order-header h3 {
        font-size: 20px;
    }
}

/* Toast Notifications */
.wheelsys-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.wheelsys-toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: auto;
    min-width: 300px;
}

.wheelsys-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.wheelsys-toast-success .toast-icon {
    background: #d4edda;
    color: #155724;
}

.wheelsys-toast-error .toast-icon {
    background: #f8d7da;
    color: #721c24;
}

.wheelsys-toast-warning .toast-icon {
    background: #fff3cd;
    color: #856404;
}

.wheelsys-toast-info .toast-icon {
    background: #d1ecf1;
    color: #0c5460;
}

.toast-icon::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.wheelsys-toast-success .toast-icon::before {
    background: #28a745;
}

.wheelsys-toast-error .toast-icon::before {
    background: #dc3545;
}

.wheelsys-toast-warning .toast-icon::before {
    background: #ffc107;
}

.wheelsys-toast-info .toast-icon::before {
    background: #17a2b8;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.wheelsys-toast-success {
    border-left: 4px solid #28a745;
}

.wheelsys-toast-error {
    border-left: 4px solid #dc3545;
}

.wheelsys-toast-warning {
    border-left: 4px solid #ffc107;
}

.wheelsys-toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #333;
}

/* Confirmation Modal */
.wheelsys-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.wheelsys-confirm-modal.active {
    display: flex;
}

.confirm-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
    z-index: 1000001;
}

.confirm-modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1000002;
    animation: slideUp 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 20px;
}

.confirm-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.confirm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.confirm-modal-body {
    padding: 24px;
}

.confirm-modal-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #666;
}

.confirm-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
}

.btn-confirm-cancel,
.btn-confirm-ok {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-confirm-cancel {
    background: #f0f0f0;
    color: #666;
}

.btn-confirm-cancel:hover {
    background: #e0e0e0;
}

.btn-confirm-ok {
    background: var(--wheelsys-primary-color, #ef343f);
    color: white;
}

.btn-confirm-ok:hover {
    background: #d63845;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 52, 63, 0.3);
}

@media (max-width: 768px) {
    .wheelsys-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .wheelsys-toast {
        min-width: auto;
    }

    .confirm-modal-content {
        margin: 20px;
    }

    .confirm-modal-footer {
        flex-direction: column-reverse;
    }

    .btn-confirm-cancel,
    .btn-confirm-ok {
        width: 100%;
    }
}