/**
 * WooCommerce Group Buy - Frontend Styles
 */

/* Container */
.wgb-container {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Pricing Display */
.wgb-pricing {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.wgb-original-price {
    font-size: 18px;
    color: #999;
}

.wgb-original-price del {
    text-decoration: line-through;
}

.wgb-current-price {
    font-size: 32px;
    font-weight: bold;
    color: #2d3748;
}

.wgb-discount-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

/* Section Title */
.wgb-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 15px 0;
}

/* Slot Info */
.wgb-slot-info {
    margin-bottom: 25px;
}

.wgb-slot-description {
    color: #4a5568;
    margin: 10px 0;
    font-size: 15px;
}

/* Progress Container */
.wgb-progress-container {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.wgb-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.wgb-slots-sold {
    color: #4a5568;
}

.wgb-slots-sold strong {
    color: #2d3748;
    font-size: 16px;
}

.wgb-percentage {
    font-weight: 600;
    color: #667eea;
    font-size: 16px;
}

/* Progress Bar */
.wgb-progress-bar {
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wgb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.wgb-progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: wgb-shimmer 2s infinite;
}

@keyframes wgb-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.wgb-slots-remaining {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #718096;
}

.wgb-slots-remaining strong {
    color: #2d3748;
}

/* Purchase Section */
.wgb-purchase-section {
    margin: 25px 0;
}

.wgb-slot-selector {
    margin-bottom: 20px;
}

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

.wgb-slot-quantity {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.wgb-slot-quantity:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Join Button */
.wgb-join-button {
    width: 100%;
    max-width: 400px;
    padding: 16px 32px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wgb-join-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3) !important;
}

.wgb-join-button:active {
    transform: translateY(0);
}

.wgb-join-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Status Messages */
.wgb-status-unlocked,
.wgb-status-completed,
.wgb-status-paused {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.wgb-status-completed {
    background: #cce5ff;
    border-color: #b8daff;
    color: #004085;
}

.wgb-status-paused {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.wgb-status-icon {
    font-size: 24px;
}

.wgb-unlock-message {
    color: #2d3748;
    margin: 15px 0;
    font-size: 15px;
    line-height: 1.6;
}

/* Follow Section */
.wgb-follow-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.wgb-follow-button {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.wgb-follow-button:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.wgb-follow-button.following {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.wgb-follow-button .follow-icon {
    font-size: 18px;
}

.wgb-follow-description {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #718096;
}

/* Features */
.wgb-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.wgb-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5568;
}

.wgb-feature-icon {
    font-size: 20px;
}

/* Badge */
.wgb-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .wgb-container {
        padding: 20px 15px;
    }
    
    .wgb-pricing {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wgb-current-price {
        font-size: 28px;
    }
    
    .wgb-slot-quantity,
    .wgb-join-button {
        max-width: 100%;
    }
    
    .wgb-features {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.wgb-loading {
    pointer-events: none;
    opacity: 0.6;
}

.wgb-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: wgb-spin 1s linear infinite;
}

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

/* Notification Styles */
.wgb-notification {
    position: fixed;
    top: -100px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
    font-size: 15px;
    font-weight: 500;
    color: #2d3748;
}

.wgb-notification.wgb-notification-show {
    top: 32px;
}

.wgb-notification-success {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.wgb-notification-error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.wgb-notification-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.wgb-notification-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

@media (max-width: 768px) {
    .wgb-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}
