/**
 * Aicoso Wishlist Admin Email Campaigns Styles
 * Note: Base layout styles are inherited from admin-dashboard.css
 */

/* Email Campaigns Page Specific Styles */

/* Main Content Area */
.aicoso-main-content {
    flex: 1;
    min-width: 0;
}

.aicoso-content-header {
    background: white;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.aicoso-page-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aicoso-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

.title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
}

.title-icon .dashicons {
    color: white;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.aicoso-page-description {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
}

/* Settings Cards */
.aicoso-setting-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.aicoso-setting-card-content {
    padding: 20px;
}

.aicoso-setting-card h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aicoso-setting-card p {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #1e293b;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Settings Form */
.aicoso-settings-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.aicoso-settings-content {
    padding: 35px 40px;
}

.aicoso-settings-section {
    margin-bottom: 30px;
}

.aicoso-settings-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.aicoso-settings-group {
    margin-bottom: 20px;
}

.aicoso-setting-row {
    margin-bottom: 25px;
    padding: 0 15px;
}

.aicoso-setting-row label {
    display: block;
    margin-bottom: 10px;
    padding-left: 3px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.aicoso-setting-row input[type="text"],
.aicoso-setting-row input[type="email"],
.aicoso-setting-row input[type="number"],
.aicoso-setting-row select,
.aicoso-setting-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.aicoso-setting-row input:focus,
.aicoso-setting-row select:focus,
.aicoso-setting-row textarea:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    
}

.aicoso-setting-row textarea {
    min-height: 120px;
    resize: vertical;
}

.aicoso-setting-row .description {
    margin-top: 6px;
    padding-left: 3px;
    font-size: 13px;
    color: #6b7280;
}

/* Toggle Switch */
.aicoso-setting-toggle {
    margin-bottom: 25px;
    padding: 0 15px;
}

.toggle-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.toggle-info label {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 4px;
}

.toggle-info .description {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.aicoso-toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}

.aicoso-toggle-switch input {
    display: none;
}

.aicoso-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}

.aicoso-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.aicoso-toggle-switch input:checked + .aicoso-toggle-slider {
    background-color: #6366f1;
}

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

/* Settings Footer */
.aicoso-settings-footer {
    padding: 20px 30px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aicoso-settings-footer .button {
    padding: 10px 24px;
    height: auto;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.aicoso-settings-footer .button-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.aicoso-settings-footer .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.campaign-info {
    color: #6b7280;
    font-size: 14px;
}

/* Notice Styles */
.aicoso-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.aicoso-notice-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.aicoso-notice p {
    margin: 0;
    display: flex;
    align-items: center;
}

.aicoso-notice .dashicons {
    margin-right: 8px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.notification-status {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.notification-status span {
    font-size: 14px;
    font-weight: 500;
}

/* Email Log Section */
.email-log-section {
    margin-top: 30px;
}

/* Enhanced Campaign Form Styles */
.aicoso-campaign-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
}

.aicoso-form-header {
    padding: 24px 30px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-bottom: none;
}

.aicoso-form-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aicoso-form-header h3 .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.aicoso-form-body {
    padding: 30px;
}

.aicoso-form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 25px;
}

.aicoso-form-row.full-width {
    display: block;
}

.aicoso-form-group {
    flex: 1;
}

.aicoso-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    
}

.aicoso-form-group label .required {
    color: #ef4444;
    margin-left: 2px;
}

.aicoso-form-group input,
.aicoso-form-group select,
.aicoso-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.aicoso-form-group input:focus,
.aicoso-form-group select:focus,
.aicoso-form-group textarea:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.aicoso-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.aicoso-help-text {
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: start;
    gap: 6px;
}

.aicoso-help-text .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Form Tags Group */
.aicoso-tags-group {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
}

.aicoso-tags-group h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aicoso-tags-group h4 .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #6366f1;
}

.aicoso-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aicoso-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Monaco', 'Courier New', monospace;
}

.aicoso-tag:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.aicoso-tag .dashicons {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Form Actions */
.aicoso-form-actions {
    padding: 20px 30px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aicoso-form-actions .button {
    padding: 10px 24px;
    height: auto;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.aicoso-form-actions .button-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.aicoso-form-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.aicoso-form-actions .button-secondary {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    color: #6b7280;
}

.aicoso-form-actions .button-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.aicoso-test-email {
    margin-left: auto;
    margin-right: 15px;
}

.aicoso-test-email .button {
    background: #10b981;
    border: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.aicoso-test-email .button:hover {
    background: #059669;
}

.aicoso-test-email .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Email Template Selection */
.aicoso-template-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.aicoso-template-card {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.aicoso-template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.aicoso-template-card.selected {
    border-color: #6366f1;
}

.aicoso-template-card.selected::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #6366f1;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aicoso-template-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 11;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aicoso-template-preview {
    width: 100%;
    height: 150px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 13px;
}

.aicoso-template-name {
    padding: 12px;
    background: white;
    text-align: center;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* Email Log Section */
.aicoso-email-log {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.aicoso-log-header {
    padding: 20px 30px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aicoso-log-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aicoso-log-header h3 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.aicoso-log-filters {
    display: flex;
    gap: 12px;
}

.aicoso-log-filters select {
    padding: 8px 35px 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

/* Log Table */
.aicoso-log-table {
    width: 100%;
    border-collapse: collapse;
}

.aicoso-log-table thead {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.aicoso-log-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aicoso-log-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.aicoso-log-table tbody tr:hover {
    background: #fafbfc;
}

.aicoso-log-table td {
    padding: 16px 20px;
    color: #374151;
    font-size: 14px;
}

/* Status Badges */
.aicoso-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
}

.aicoso-status-badge.sent {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.aicoso-status-badge.pending {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
}

.aicoso-status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.aicoso-status-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Empty State */
.aicoso-empty-state {
    padding: 60px 20px;
    text-align: center;
}

.aicoso-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aicoso-empty-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #9ca3af;
}

.aicoso-empty-state h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.aicoso-empty-state p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .aicoso-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .aicoso-template-selection {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .wrap.aicoso-wishlist-admin {
        margin-right: 10px;
    }
    
    .aicoso-form-body {
        padding: 20px;
    }
    
    .aicoso-log-filters {
        flex-direction: column;
    }
    
    .aicoso-log-table {
        font-size: 13px;
    }
    
    .aicoso-log-table th,
    .aicoso-log-table td {
        padding: 10px;
    }
}

/* Additional Utility Styles */
.aicoso-pro-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aicoso-coming-soon {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.aicoso-coming-soon::after {
    content: 'Coming Soon';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

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

.aicoso-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #6366f1;
    border-top-color: transparent;
    border-radius: 50%;
    animation: aicoso-spin 0.8s linear infinite;
}

@keyframes aicoso-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.aicoso-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInDown 0.3s ease;
}

.aicoso-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.aicoso-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.aicoso-message .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

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

/* Gradient Background Pattern */
.aicoso-gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.aicoso-gradient-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Hover Effects for Interactive Elements */
.aicoso-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aicoso-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Custom Scrollbar for Log Section */
.aicoso-log-content {
    max-height: 500px;
    overflow-y: auto;
}

.aicoso-log-content::-webkit-scrollbar {
    width: 8px;
}

.aicoso-log-content::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.aicoso-log-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.aicoso-log-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Enhanced Focus States */
.aicoso-form-group input:focus,
.aicoso-form-group select:focus,
.aicoso-form-group textarea:focus {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}