/**
 * Reserve Panel Styles - Reserv&eacute;r & hent i butik
 * Created: 2025-10-24
 *
 * Styles for the product reservation slide-in panel
 */

/* Reserve Panel - Slide in from right */
.reserve-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.reserve-panel.active {
    right: 0;
}

/* Reserve Panel Content */
.reserve-panel-content {
    padding: 20px;
}

/* Panel Header */
.reserve-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.reserve-panel-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.reserve-panel-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.reserve-panel-close:hover {
    opacity: 1;
}

.reserve-panel-close svg {
    width: 20px;
    height: 20px;
}

/* Product Info Display */
.reserve-product-info {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 20px;
}

.reserve-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.reserve-product-details {
    flex: 1;
}

.reserve-product-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.reserve-product-variant {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.reserve-product-number {
    font-size: 12px;
    color: #999;
}

/* Steps Container */
.reserve-step {
    animation: fadeIn 0.3s ease;
}

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

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

.reserve-step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Store Selection Cards */
.reserve-store-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reserve-store-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.reserve-store-card:hover {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reserve-store-card-info {
    flex: 1;
}

.reserve-store-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.reserve-store-card-stock {
    font-size: 14px;
}

.reserve-store-card-stock .stock-available {
    color: #28a745;
    font-weight: 500;
}

.reserve-store-card-stock .stock-unavailable {
    color: #999;
}

.reserve-store-card-btn,
.out-of-stock-store-card-btn {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.reserve-store-card-btn:hover,
.out-of-stock-store-card-btn:hover {
    background: #000;
    transform: translateX(2px);
}

/* Back Button */
.reserve-back-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    transition: color 0.2s ease;
}

.reserve-back-btn:hover {
    color: #333;
}

.reserve-back-btn svg {
    width: 16px;
    height: 16px;
}

/* Selected Store Display */
.reserve-selected-store {
    padding: 12px;
    background: #e8f5e9;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.reserve-contact-selected-store {
    padding: 12px;
    background: #f8f1b3;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.reserve-selected-store strong {
    color: #2e7d32;
}

.reserve-contact-selected-store strong {
    color: #faa00f;
}

/* Form Styling */
.reserve-form-fields {
    margin-bottom: 20px;
}

.reserve-form-group {
    margin-bottom: 15px;
}

.reserve-form-group .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.reserve-form-group .form-required {
    color: #d9534f;
}

.reserve-form-group .form-input,
.reserve-form-group .form-select {
    width: 100%;
}

.reserve-form-group textarea.form-input {
    resize: vertical;
    min-height: 60px;
    width: 100%;
    padding: 5px;
}

/* reCAPTCHA container */
.reserve-recaptcha {
    margin: 20px 0;
}

/* Submit Button */
.reserve-form-submit {
    margin-top: 20px;
}

.reserve-submit-btn {
    width: 100%;
    padding: 26px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Messages */
.reserve-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

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

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

/* Overlay Backdrop */
.reserve-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reserve-overlay.active {
    opacity: 1;
}

/* Product transaction button container - Desktop */
.m-product-transaction-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Hide mobile reserve button on desktop */
.m-product-reserve-mobile {
    display: none;
}

/* Mobile/Tablet: Show mobile reserve button and hide desktop reserve button */
@media (max-width: 1160px) {

    /* Hide desktop reserve button */
    .m-product-transaction-button .reserve-button {
        display: none !important;
    }

    /* Show mobile reserve button - full width */
    .m-product-reserve-mobile {
        display: block;
        margin-top: 10px;
    }

    .m-product-reserve-mobile .reserve-button {
        width: 100%;
        display: block;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .reserve-panel {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }

    .reserve-panel-content {
        padding: 15px;
    }

    .reserve-product-info {
        padding: 12px;
    }

    .reserve-product-image {
        width: 60px;
        height: 60px;
    }
}

/* Loading state */
.reserve-form.loading .reserve-submit-btn {
    opacity: 0.6;
    pointer-events: none;
}

.reserve-form.loading .reserve-submit-btn::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: ".";
    }

    40% {
        content: "..";
    }

    60%,
    100% {
        content: "...";
    }
}