/**
 * Prime SEO Admin Shared Styles
 *
 * Common styles for all Prime SEO admin pages.
 * Includes: header, layout, cards, responsive.
 *
 * @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 - Dark Premium Style */
.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 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.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-back {
    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;
    transition: all 0.15s;
}

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

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

.prime-layout {
    display: flex;
    gap: 24px;
}

.prime-main {
    flex: 1;
    min-width: 0;
}

.prime-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 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-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;
}

/* ============================================
   Sticky Save Bar (Unsaved Changes)
   ============================================ */
.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: prime-pulse 2s infinite;
}

@keyframes prime-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: prime-spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 1100px) {
    .prime-layout {
        flex-direction: column;
    }

    .prime-sidebar {
        width: 100%;
    }
}

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

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

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

    .prime-header {
        padding: 20px 16px;
    }

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

    .prime-sticky-save-text {
        font-size: 12px;
    }

    .prime-sticky-save button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
    --prime-primary: #6366f1;
    --prime-primary-hover: #4f46e5;
    --prime-primary-light: #eef2ff;
    --prime-secondary: #8b5cf6;
    --prime-success: #10b981;
    --prime-warning: #f59e0b;
    --prime-danger: #ef4444;
    --prime-dark: #1e293b;
    --prime-text: #334155;
    --prime-text-light: #64748b;
    --prime-border: #e2e8f0;
    --prime-bg: #f8fafc;
    --prime-white: #ffffff;
    --prime-radius-lg: 12px;
}

/* ============================================
   PRO UPSELL CARDS (FREE only)
   ============================================ */

.prime-upsell-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 2px dashed var(--prime-primary);
    border-radius: var(--prime-radius-lg);
    padding: 24px;
    margin-top: 20px;
}

.prime-upsell-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.prime-upsell-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.prime-upsell-card-title {
    flex: 1;
}

.prime-upsell-card-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--prime-dark);
}

.prime-upsell-card-title p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--prime-text-light);
}

.prime-upsell-features {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.prime-upsell-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--prime-text);
}

.prime-upsell-features li::before {
    content: "✓";
    color: var(--prime-success);
    font-weight: bold;
    font-size: 14px;
}

.prime-upsell-card .prime-upsell-btn,
a.prime-upsell-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    padding: 12px 24px;
    border: none !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    cursor: pointer;
}

.prime-upsell-card .prime-upsell-btn:hover,
.prime-upsell-card .prime-upsell-btn:focus,
.prime-upsell-card .prime-upsell-btn:active,
a.prime-upsell-btn:hover,
a.prime-upsell-btn:focus,
a.prime-upsell-btn:active {
    background: linear-gradient(135deg, #5a5de8 0%, #6b4199 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none !important;
    outline: none;
}

.prime-upsell-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #ffffff !important;
}

/* Sidebar Upsell Card */
.prime-ql-upsell {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px dashed var(--prime-primary);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.prime-ql-upsell-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.prime-ql-upsell-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prime-ql-upsell-icon .dashicons {
    color: #fff;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.prime-ql-upsell h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--prime-dark);
}

.prime-ql-upsell-desc {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--prime-text);
    line-height: 1.4;
}

.prime-ql-upsell-features {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.prime-ql-upsell-features li {
    font-size: 12px;
    color: var(--prime-text-light);
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prime-ql-upsell-features li::before {
    content: "•";
    color: var(--prime-primary);
}

.prime-ql-upsell .prime-ql-upsell-btn,
a.prime-ql-upsell-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    padding: 12px 16px;
    border: none !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    cursor: pointer;
}

.prime-ql-upsell .prime-ql-upsell-btn:hover,
.prime-ql-upsell .prime-ql-upsell-btn:focus,
.prime-ql-upsell .prime-ql-upsell-btn:active,
a.prime-ql-upsell-btn:hover,
a.prime-ql-upsell-btn:focus,
a.prime-ql-upsell-btn:active {
    background: linear-gradient(135deg, #5a5de8 0%, #6b4199 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none !important;
    outline: none;
}

@media (max-width: 782px) {
    .prime-upsell-features {
        grid-template-columns: 1fr;
    }
}

