/* WooCommerce Subscription Modal Styles */

/* Trigger Button */
.wcsm-trigger-btn {
    background: linear-gradient(135deg, #8b7355 0%, #a89176 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.3);
    transition: all 0.3s;
}

.wcsm-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 115, 85, 0.4);
}

/* Modal Overlay */
.wcsm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
}

.wcsm-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wcsmFadeIn 0.3s;
}

@keyframes wcsmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wcsm-modal-wrapper {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: auto;
    animation: wcsmSlideUp 0.4s;
}

@keyframes wcsmSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcsm-modal-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 85vh;
}

/* Close Button */
.wcsm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.wcsm-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Modal Layout */
.wcsm-modal-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
}

/* Product Sidebar */
.wcsm-product-sidebar {
    background: linear-gradient(180deg, #f8f6f3 0%, #e8e0d5 100%);
    padding: 30px 25px;
    overflow-y: auto;
    max-height: 85vh;
}

.wcsm-sidebar-header h2 {
    font-size: 32px;
    color: #4a3728;
    margin: 0 0 5px 0;
}

.wcsm-sidebar-subtitle {
    color: #666;
    font-size: 13px;
    margin-bottom: 25px;
}

/* Product List */
.wcsm-product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wcsm-product-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all 0.3s;
}

.wcsm-product-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

.wcsm-product-image-wrapper {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
}

.wcsm-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.wcsm-product-icon-placeholder {
    width: 65px;
    height: 65px;
    background: #f8f6f3;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #8b7355;
}

.wcsm-product-info {
    flex: 1;
}

.wcsm-product-name {
    font-size: 15px;
    color: #4a3728;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.wcsm-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.wcsm-qty-btn {
    width: 32px;
    height: 32px;
    background: #8b7355;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.wcsm-qty-btn:hover {
    background: #6d5a43;
}

.wcsm-qty-value {
    width: 45px;
    height: 32px;
    text-align: center;
    border: 2px solid #d4c4b0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcsm-product-price {
    font-size: 12px;
    color: #8b7355;
    font-weight: 600;
    margin: 0;
}

/* Form Area */
.wcsm-form-area {
    padding: 30px;
    overflow-y: auto;
    max-height: 85vh;
}

/* Progress Section */
.wcsm-progress-section {
    background: #f8f6f3;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.wcsm-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wcsm-progress-label {
    font-size: 11px;
    font-weight: 600;
    color: #4a3728;
    letter-spacing: 0.5px;
}

.wcsm-bottle-count {
    font-size: 18px;
    font-weight: bold;
    color: #8b7355;
}

.wcsm-progress-bar-container {
    width: 100%;
    height: 22px;
    background: #e8e0d5;
    border-radius: 11px;
    overflow: hidden;
}

.wcsm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b7355 0%, #a89176 100%);
    width: 0%;
    transition: width 0.4s ease;
}

.wcsm-progress-note {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #666;
    text-align: center;
}

/* Plan Selection */
.wcsm-plan-selection {
    background: #f8f6f3;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.wcsm-plan-title {
    font-size: 12px;
    font-weight: 600;
    color: #4a3728;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcsm-plan-buttons {
    display: flex;
    gap: 10px;
}

.wcsm-plan-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #d4c4b0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.wcsm-plan-btn:hover {
    border-color: #8b7355;
    transform: translateY(-2px);
}

.wcsm-plan-btn.active {
    background: #8b7355;
    color: white;
    border-color: #8b7355;
}

.wcsm-plan-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 3px;
}

.wcsm-plan-detail {
    font-size: 11px;
    opacity: 0.8;
}

/* Order Summary */
.wcsm-order-summary {
    background: white;
    border: 2px solid #e8e0d5;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.wcsm-summary-title {
    font-size: 12px;
    font-weight: 600;
    color: #4a3728;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcsm-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: #666;
}

.wcsm-summary-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b7355, transparent);
    margin: 10px 0;
}

.wcsm-summary-row.wcsm-total {
    font-weight: bold;
    color: #4a3728;
    padding-top: 12px;
    font-size: 20px;
}

.wcsm-summary-row.wcsm-highlight {
    color: #28a745;
    font-weight: 600;
}

/* Error Message */
.wcsm-error-message {
    background: #fee;
    border: 2px solid #fcc;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .wcsm-modal-layout {
        grid-template-columns: 1fr;
    }
    
    .wcsm-product-sidebar,
    .wcsm-form-area {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .wcsm-modal-wrapper {
        padding: 10px;
    }
    
    .wcsm-plan-buttons {
        flex-direction: column;
    }
}

/* Prevent body scroll when modal open */
body.wcsm-modal-open {
    overflow: hidden;
}
