/**
 * Wise Stock Timebound Admin Styles
 *
 * This file contains styles specific to timebound admin functionality.
 * It extends the main admin styles with timebound-specific components.
 *
 * @package WiseStock
 * @since 1.0.1
 */

/* ======================================================================
   TIMEBOUND FEATURE BADGE
   ====================================================================== */

.wisestock-feature-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* ======================================================================
   TIMEBOUND SETTINGS CARD
   ====================================================================== */

.wisestock-card h2.wisestock-card-title .wisestock-feature-badge {
    position: relative;
    top: -1px;
}

#timebound-advanced-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* ======================================================================
   TIMEBOUND FORM ENHANCEMENTS
   ====================================================================== */

.wisestock-timebound-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e6e9ff;
}

.wisestock-timebound-highlight {
    background: rgba(102, 126, 234, 0.05);
    border-left: 4px solid #667eea;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

/* ======================================================================
   VALIDATION STYLES
   ====================================================================== */

.wisestock-validation-error,
.wisestock-threshold-validation-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
}

.wisestock-form-input.has-error {
    border-color: #d63638;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.1);
}

.wisestock-form-input.has-success {
    border-color: #46b450;
    box-shadow: 0 0 0 2px rgba(70, 180, 80, 0.1);
}

/* ======================================================================
   PRESET NOTIFICATION
   ====================================================================== */

.wisestock-preset-notification {
    background: #d7f1d7;
    border: 1px solid #6ba76b;
    color: #155724;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.wisestock-preset-notification::before {
    content: "✓";
    background: #46b450;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* ======================================================================
   TIMEBOUND SPECIFIC FORM ELEMENTS
   ====================================================================== */

.wisestock-prediction-window-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .wisestock-prediction-window-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.wisestock-threshold-group {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

.wisestock-threshold-group h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

/* ======================================================================
   ADVANCED OPTIONS TOGGLE
   ====================================================================== */

.wisestock-advanced-options {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0;
    margin: 20px 0;
    overflow: hidden;
}

.wisestock-advanced-options-header {
    background: #e9ecef;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

.wisestock-advanced-options-header:hover {
    background: #dee2e6;
}

.wisestock-advanced-options-header::after {
    content: "▼";
    font-size: 12px;
    transition: transform 0.3s ease;
}

.wisestock-advanced-options-header.collapsed::after {
    transform: rotate(-90deg);
}

.wisestock-advanced-options-content {
    padding: 20px;
}

/* ======================================================================
   HELP TEXT ENHANCEMENTS
   ====================================================================== */

.wisestock-form-help.timebound-help {
    background: #f0f8ff;
    border-left: 3px solid #0073aa;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    line-height: 1.5;
}

.wisestock-form-help.timebound-help::before {
    content: "💡";
    margin-right: 8px;
}

/* ======================================================================
   STORE TYPE PRESET SPECIFIC STYLES
   ====================================================================== */

.wisestock-store-preset-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    margin: 15px 0;
}

.wisestock-store-preset-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.wisestock-store-preset-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* ======================================================================
   RESPONSIVE ADJUSTMENTS
   ====================================================================== */

@media (max-width: 1200px) {
    .wisestock-prediction-window-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .wisestock-feature-badge {
        display: block;
        margin: 5px 0 0 0;
        width: fit-content;
    }
    
    .wisestock-timebound-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .wisestock-advanced-options-header {
        padding: 12px 15px;
    }
    
    .wisestock-advanced-options-content {
        padding: 15px;
    }
}

/* ======================================================================
   ANIMATION ENHANCEMENTS
   ====================================================================== */

#timebound-advanced-settings {
    transition: all 0.3s ease;
}

.wisestock-form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wisestock-preset-notification {
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================================================
   LOADING STATES
   ====================================================================== */

.wisestock-timebound-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.wisestock-timebound-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ======================================================================
   DARK MODE COMPATIBILITY
   ====================================================================== */

@media (prefers-color-scheme: dark) {
    .wisestock-timebound-section {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        border-color: #2d3748;
    }
    
    .wisestock-timebound-highlight {
        background: rgba(102, 126, 234, 0.1);
        border-left-color: #667eea;
    }
    
    .wisestock-threshold-group {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .wisestock-form-help.timebound-help {
        background: #2d3748;
        border-left-color: #667eea;
        color: #e2e8f0;
    }
}