/**
 * Prime SEO Settings Display Styles
 *
 * Dashboard and settings page styles.
 *
 * @package Prime_SEO
 * @since 3.8.1
 */

/* Reset & Base */
.prime-wrap * {
    box-sizing: border-box;
}

.prime-wrap {
    margin: -8px -20px 0 -2px;
    background: #f1f5f9;
    min-height: 100vh;
}

/* Header */
.prime-header {
    background: linear-gradient(160deg, rgb(17, 24, 39) 0%, rgb(31, 41, 55) 50%, rgb(17, 24, 39) 100%);
    padding: 32px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.prime-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.prime-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.prime-logo .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}

.prime-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.prime-header-sub {
    font-size: 13px;
    color: #818cf8;
    margin: 6px 0 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.prime-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prime-version {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.prime-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    color: #818cf8;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.prime-help:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

/* Content */
.prime-content {
    padding: 24px 32px;
    max-width: 1400px;
}

/* Stats */
.prime-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

.prime-stat {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.prime-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}

.prime-stat-icon.purple {
    background: linear-gradient(135deg, #818cf8, #6366f1);
}

.prime-stat-icon.green {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.prime-stat-icon.yellow {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.prime-stat-icon.red {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.prime-stat h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.prime-stat span {
    font-size: 13px;
    color: #64748b;
    display: block;
}

/* Layout */
.prime-main {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.prime-left {
    flex: 1;
    min-width: 500px;
}

.prime-sidebar {
    width: 340px;
}

/* Cards */
.prime-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    overflow: hidden;
}

.prime-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 16px;
}

.prime-card-icon {
    width: 44px;
    height: 44px;
    background: #eef2ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-card-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #6366f1;
}

.prime-card-icon.green {
    background: #d1fae5;
}

.prime-card-icon.green .dashicons {
    color: #10b981;
}

.prime-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.prime-card-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.prime-card-body {
    padding: 24px;
}

/* Form Fields */
.prime-field {
    margin-bottom: 24px;
}

.prime-field:last-child {
    margin-bottom: 0;
}

.prime-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.prime-field label span {
    font-weight: 400;
    color: #64748b;
    font-size: 13px;
}

.prime-field input[type="text"],
.prime-field textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

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

.prime-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Character Counter */
.prime-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 13px;
}

.prime-counter-left {
    color: #64748b;
}

.prime-counter-left strong {
    color: #1e293b;
}

.prime-counter-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.prime-counter-status.good {
    color: #10b981;
}

.prime-counter-status.warning {
    color: #f59e0b;
}

.prime-counter-status.bad {
    color: #ef4444;
}

/* Preview */
.prime-preview {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.prime-preview-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.prime-preview-box {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
}

.prime-preview-url {
    font-size: 12px;
    color: #202124;
    margin-bottom: 4px;
    font-family: Arial, sans-serif;
}

.prime-preview-title {
    font-size: 18px;
    color: #1a0dab;
    font-family: Arial, sans-serif;
    line-height: 1.3;
    margin-bottom: 4px;
}

.prime-preview-desc {
    font-size: 13px;
    color: #4d5156;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}

/* Toggle Switch */
.prime-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.prime-toggle-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.prime-toggle-text p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.prime-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.prime-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.prime-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 28px;
    transition: 0.3s;
}

.prime-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.prime-switch input:checked + .prime-switch-slider {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

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

/* Sitemap Active */
.prime-sitemap-active {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #d1fae5;
    border-radius: 8px;
    margin-top: 16px;
}

.prime-sitemap-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-sitemap-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #fff;
}

.prime-sitemap-active h4 {
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
    margin: 0 0 2px;
}

.prime-sitemap-active p {
    font-size: 13px;
    color: #047857;
    margin: 0;
}

.prime-sitemap-url {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.prime-sitemap-url code {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    word-break: break-all;
}

.prime-sitemap-url a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
}

.prime-sitemap-url a:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* Save Button */
.prime-save {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 16px;
}

.prime-save span {
    font-size: 13px;
    color: #64748b;
}

.prime-save button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

.prime-save button:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Widget */
.prime-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.prime-widget-icon {
    width: 36px;
    height: 36px;
    background: #eef2ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-widget-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #6366f1;
}

.prime-widget-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Links */
.prime-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.prime-links li {
    border-bottom: 1px solid #f1f5f9;
}

.prime-links li:last-child {
    border-bottom: none;
}

.prime-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 14px;
    color: #334155;
    text-decoration: none;
}

.prime-links a:hover {
    background: #f8fafc;
    color: #6366f1;
}

.prime-links .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.prime-links a:hover .dashicons {
    color: #6366f1;
}

/* Support Widget */
.prime-support {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #93c5fd;
}

.prime-support .prime-widget-icon {
    background: #3b82f6;
}

.prime-support .prime-widget-icon .dashicons {
    color: #fff;
}

.prime-support-body {
    padding: 20px;
}

.prime-support-body > p {
    font-size: 14px;
    color: #1e40af;
    margin: 0 0 16px;
    line-height: 1.5;
}

.prime-support-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prime-support-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1d4ed8;
    text-decoration: none;
}

.prime-support-links a:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

/* Rate Widget */
.prime-rate {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fbbf24;
}

.prime-rate .prime-widget-icon {
    background: #f59e0b;
}

.prime-rate .prime-widget-icon .dashicons {
    color: #fff;
}

.prime-rate-body {
    padding: 20px;
}

.prime-rate-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.prime-rate-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #92400e;
}

.prime-rate-list .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #d97706;
}

.prime-rate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #d97706;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.prime-rate-btn:hover {
    background: #b45309;
    color: #fff;
}

/* Card Footer with Save Button */
.prime-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.prime-card-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.prime-card-save:hover,
.prime-card-save:focus,
.prime-card-save:active,
a.prime-card-save:hover,
a.prime-card-save:focus,
a.prime-card-save:active,
a.prime-card-save:visited {
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
    outline: none;
}

.prime-card-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.prime-card-save .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.prime-card-save.saving .dashicons {
    animation: spin 1s linear infinite;
}

.prime-card-save.saved {
    background: linear-gradient(135deg, #10b981, #059669);
}

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

/* Sticky Save Bar */
.prime-sticky-save {
    position: fixed;
    bottom: 0;
    left: 160px;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.prime-sticky-save.visible {
    transform: translateY(0);
}

.prime-sticky-save-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prime-sticky-save-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: pulse 2s infinite;
}

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

.prime-sticky-save-text {
    font-size: 14px;
    color: #64748b;
}

.prime-sticky-save-text strong {
    color: #1e293b;
}

.prime-sticky-save button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.prime-sticky-save button:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.prime-sticky-save button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.prime-sticky-save button.saving .dashicons {
    animation: spin 1s linear infinite;
}

/* Toast Notification */
.prime-toast {
    position: fixed;
    bottom: 100px;
    right: 32px;
    background: #1e293b;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(calc(100% + 50px));
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.prime-toast.visible {
    transform: translateX(0);
}

.prime-toast.success {
    background: #10b981;
}

.prime-toast.error {
    background: #ef4444;
}

.prime-toast .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Collapsed/Expanded sections */
.prime-card.collapsed .prime-card-body {
    display: none;
}

.prime-card.collapsed .prime-card-footer {
    display: none;
}

.prime-card-header {
    cursor: pointer;
    user-select: none;
}

.prime-card-header .prime-collapse-icon {
    margin-left: auto;
    color: #94a3b8;
    transition: transform 0.2s;
}

.prime-card.collapsed .prime-card-header .prime-collapse-icon {
    transform: rotate(-90deg);
}

/* Responsive */
@media (max-width: 1100px) {
    .prime-sidebar {
        width: 100%;
    }

    .prime-left {
        min-width: 100%;
    }

    .prime-sticky-save {
        left: 0;
    }
}

@media (max-width: 782px) {
    .prime-sticky-save {
        left: 0;
    }
}

@media (max-width: 600px) {
    .prime-content {
        padding: 16px;
        padding-bottom: 100px;
    }

    .prime-header {
        padding: 16px;
    }

    .prime-stats {
        flex-direction: column;
    }

    .prime-stat {
        min-width: 100%;
    }

    .prime-sticky-save {
        padding: 12px 16px;
    }
}

