/* ============================================
   Price Sync for eMAG - Modern UI Styles
   Version: 2.3.0
   ============================================ */

:root {
    --weps-primary: #667eea;
    --weps-primary-dark: #5568d3;
    --weps-secondary: #764ba2;
    --weps-success: #10b981;
    --weps-warning: #f59e0b;
    --weps-danger: #ef4444;
    --weps-info: #3b82f6;
    
    --weps-bg-primary: #ffffff;
    --weps-bg-secondary: #f8fafc;
    --weps-bg-card: #ffffff;
    
    --weps-text-primary: #1e293b;
    --weps-text-secondary: #64748b;
    --weps-text-muted: #94a3b8;
    
    --weps-border: #e2e8f0;
    --weps-border-light: #f1f5f9;
    
    --weps-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --weps-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --weps-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --weps-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --weps-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --weps-radius: 12px;
    --weps-radius-sm: 8px;
    --weps-radius-lg: 16px;
    
    --weps-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Layout Principal
   ============================================ */

.weps-modern-wrap {
    background: var(--weps-bg-secondary);
    margin: -20px -20px -20px -2px;
    padding: 32px;
    min-height: 100vh;
}

.weps-modern-wrap h1 {
    display: none;
}

/* ============================================
   Header
   ============================================ */

.weps-header {
    background: linear-gradient(135deg, var(--weps-primary) 0%, var(--weps-secondary) 100%);
    border-radius: var(--weps-radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--weps-shadow-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease-out;
}

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

.weps-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.weps-logo {
    animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

.weps-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.weps-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 4px 0 0 0;
    font-weight: 400;
}

.weps-version-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.weps-back-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: var(--weps-transition);
    backdrop-filter: blur(10px);
}

.weps-back-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-2px);
}

/* ============================================
   Dashboard
   ============================================ */

.weps-dashboard {
    animation: fadeIn 0.6s ease-out;
}

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

/* ============================================
   Cards
   ============================================ */

.weps-card {
    background: var(--weps-bg-card);
    border-radius: var(--weps-radius);
    box-shadow: var(--weps-shadow);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--weps-transition);
}

.weps-card:hover {
    box-shadow: var(--weps-shadow-md);
    transform: translateY(-2px);
}

.weps-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px 24px;
    border-bottom: 2px solid var(--weps-border-light);
}

.weps-card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--weps-text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.weps-card-header h2 .dashicons {
    color: var(--weps-primary);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.weps-card-body {
    padding: 32px 24px;
}

/* ============================================
   Info Cards Grid
   ============================================ */

.weps-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.weps-info-card {
    background: var(--weps-bg-card);
    border-radius: var(--weps-radius);
    padding: 24px;
    box-shadow: var(--weps-shadow);
    display: flex;
    gap: 16px;
    transition: var(--weps-transition);
    border-left: 4px solid;
}

.weps-info-card:hover {
    box-shadow: var(--weps-shadow-md);
    transform: translateY(-4px);
}

.weps-info-card-blue {
    border-color: var(--weps-info);
}

.weps-info-card-green {
    border-color: var(--weps-success);
}

.weps-info-card-purple {
    border-color: var(--weps-primary);
}

.weps-info-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--weps-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.weps-info-card-blue .weps-info-card-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--weps-info);
}

.weps-info-card-green .weps-info-card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--weps-success);
}

.weps-info-card-purple .weps-info-card-icon {
    background: rgba(102, 126, 234, 0.1);
    color: var(--weps-primary);
}

.weps-info-card-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--weps-text-primary);
}

.weps-info-card-content p {
    margin: 0;
    font-size: 14px;
    color: var(--weps-text-secondary);
    line-height: 1.5;
}

/* ============================================
   Section Intro
   ============================================ */

.weps-section-intro {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-left: 4px solid var(--weps-primary);
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: var(--weps-radius-sm);
}

.weps-section-intro p {
    margin: 0;
    color: var(--weps-text-primary);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   Form Elements
   ============================================ */

.weps-input-group {
    position: relative;
    margin-bottom: 8px;
}

.weps-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--weps-text-muted);
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
}

.weps-modern-input {
    width: 100%;
    padding: 14px 16px 14px 48px !important;
    border: 2px solid var(--weps-border) !important;
    border-radius: var(--weps-radius-sm) !important;
    font-size: 14px !important;
    transition: var(--weps-transition) !important;
    background: var(--weps-bg-primary) !important;
    color: var(--weps-text-primary) !important;
    box-shadow: none !important;
}

.weps-modern-input:focus {
    border-color: var(--weps-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.weps-modern-input::placeholder {
    color: var(--weps-text-muted);
}

.weps-url-input {
    background: var(--weps-bg-secondary) !important;
    cursor: not-allowed;
}

.weps-input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--weps-text-muted);
    font-weight: 600;
    font-size: 16px;
}

/* ============================================
   Select Elements
   ============================================ */

.weps-select-wrapper {
    position: relative;
}

.weps-modern-select {
    width: 100%;
    padding: 14px 40px 14px 16px !important;
    border: 2px solid var(--weps-border) !important;
    border-radius: var(--weps-radius-sm) !important;
    font-size: 14px !important;
    transition: var(--weps-transition) !important;
    background: var(--weps-bg-primary) !important;
    color: var(--weps-text-primary) !important;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}

.weps-modern-select:focus {
    border-color: var(--weps-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* ============================================
   Toggle Switch
   ============================================ */

.weps-toggle-wrapper {
    margin-bottom: 8px;
}

.weps-sync-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weps-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.weps-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.weps-toggle-slider {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--weps-border);
    border-radius: 100px;
    transition: var(--weps-transition);
}

.weps-toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    top: 3px;
    left: 3px;
    transition: var(--weps-transition);
    box-shadow: var(--weps-shadow-sm);
}

.weps-toggle-input:checked + .weps-toggle-slider {
    background: var(--weps-success);
}

.weps-toggle-input:checked + .weps-toggle-slider::before {
    transform: translateX(24px);
}

.weps-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--weps-text-primary);
}

.weps-toggle:hover .weps-toggle-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Sync Warning Badge */
.weps-sync-warning-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--weps-warning);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.weps-sync-warning-badge svg {
    fill: var(--weps-warning);
}

/* Sync Status Badge in Header */
.weps-sync-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    margin-right: 12px;
}

.weps-sync-active {
    background: rgba(16, 185, 129, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.weps-sync-inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}

/* Global Warning Banner */
.weps-global-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid var(--weps-warning);
    border-radius: var(--weps-radius);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: var(--weps-shadow);
    animation: slideDown 0.5s ease-out;
}

.weps-global-warning-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--weps-warning);
}

.weps-global-warning-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--weps-text-primary);
}

.weps-global-warning-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--weps-text-secondary);
}

/* ============================================
   Field Descriptions
   ============================================ */

.weps-field-description {
    margin: 8px 0 0 0 !important;
    padding: 12px;
    background: var(--weps-bg-secondary);
    border-radius: var(--weps-radius-sm);
    font-size: 13px;
    color: var(--weps-text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.weps-info-icon {
    flex-shrink: 0;
    font-size: 16px;
}

.weps-field-description code {
    background: rgba(102, 126, 234, 0.1);
    color: var(--weps-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ============================================
   Buttons
   ============================================ */

.weps-form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--weps-border-light);
    display: flex;
    gap: 12px;
}

.weps-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--weps-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--weps-transition);
    border: none;
    text-decoration: none;
}

.weps-button-primary {
    background: linear-gradient(135deg, var(--weps-primary) 0%, var(--weps-secondary) 100%);
    color: #ffffff;
    box-shadow: var(--weps-shadow);
}

.weps-button-primary:hover {
    box-shadow: var(--weps-shadow-lg);
    transform: translateY(-2px);
}

.weps-button-primary:active {
    transform: translateY(0);
}

.weps-button svg {
    flex-shrink: 0;
}

/* ============================================
   Help Section
   ============================================ */

.weps-help-section {
    margin-top: 24px;
}

.weps-help-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid var(--weps-warning);
    border-radius: var(--weps-radius);
    padding: 24px;
    box-shadow: var(--weps-shadow);
}

.weps-help-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--weps-text-primary);
}

.weps-help-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.weps-help-card li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    line-height: 1.6;
    color: var(--weps-text-secondary);
}

.weps-help-card li:last-child {
    margin-bottom: 0;
}

.weps-help-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--weps-warning);
    font-weight: bold;
}

.weps-help-card strong {
    color: var(--weps-text-primary);
}

/* ============================================
   Form Table Styling
   ============================================ */

.form-table th {
    padding: 20px 10px 20px 0;
    font-weight: 600;
    color: var(--weps-text-primary);
    font-size: 14px;
}

.form-table td {
    padding: 20px 10px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 782px) {
    .weps-modern-wrap {
        margin: -20px -10px -20px -10px;
        padding: 16px;
    }
    
    .weps-header {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }
    
    .weps-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .weps-title {
        font-size: 24px;
    }
    
    .weps-info-cards {
        grid-template-columns: 1fr;
    }
    
    .weps-card-body {
        padding: 24px 16px;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.weps-loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
