/**
 * Prime SEO - Schema Markup Admin Page Styles
 *
 * @package    Prime_SEO
 * @subpackage Prime_SEO/admin/css
 * @since      1.5.0
 */

/* ==========================================================================
   Base
   ========================================================================== */

.prime-schema-wrap * {
    box-sizing: border-box;
}

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

/* ==========================================================================
   Header - Dark Premium Style
   ========================================================================== */

.prime-schema-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-schema-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.prime-schema-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-schema-logo .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}

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

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

.prime-schema-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;
}

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

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

.prime-schema-layout {
    display: flex;
    gap: 24px;
    padding: 24px 32px;
    max-width: 1400px;
}

.prime-schema-main {
    flex: 1;
    min-width: 0;
    max-width: 900px;
}

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

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

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

/* ==========================================================================
   Stats
   ========================================================================== */

.prime-schema-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

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

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

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

.prime-schema-stat-icon.purple {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.prime-schema-stat-icon.blue {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

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

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

.prime-schema-stat span {
    font-size: 12px;
    color: #64748b;
}

/* ==========================================================================
   Card
   ========================================================================== */

.prime-schema-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-schema-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 14px;
}

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

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

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

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

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

.prime-schema-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

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

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

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

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

.prime-schema-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.prime-schema-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: 0.2s;
}

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

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

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

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

.prime-schema-section {
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    margin-top: 20px;
}

.prime-schema-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.prime-schema-section-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #6366f1;
}

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

.prime-schema-section-header p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   Type Selector - Compact
   ========================================================================== */

.prime-schema-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.prime-schema-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.prime-schema-type-btn:hover {
    border-color: #c7d2fe;
    background: #fafaff;
}

.prime-schema-type-btn.selected {
    border-color: #6366f1;
    background: #eef2ff;
}

.prime-schema-type-btn input {
    display: none;
}

.prime-schema-type-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #6366f1;
}

.prime-schema-type-btn span {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.prime-schema-type-btn small {
    font-size: 12px;
    color: #64748b;
    margin-left: auto;
}

/* ==========================================================================
   Fields
   ========================================================================== */

.prime-schema-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

.prime-schema-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prime-schema-field.full {
    grid-column: 1 / -1;
}

.prime-schema-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prime-schema-field label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.prime-schema-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}

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

.prime-schema-field input::placeholder {
    color: #94a3b8;
}

/* ==========================================================================
   Logo Upload
   ========================================================================== */

.prime-schema-logo-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.prime-schema-logo-preview {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.prime-schema-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prime-schema-logo-preview .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #94a3b8;
}

.prime-schema-logo-actions {
    display: flex;
    gap: 8px;
}

.prime-schema-logo-actions .button {
    padding: 6px 12px;
    font-size: 12px;
}

/* ==========================================================================
   Social Grid
   ========================================================================== */

.prime-schema-social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ==========================================================================
   Info Box
   ========================================================================== */

.prime-schema-info {
    margin-top: 20px;
    padding: 16px 18px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.prime-schema-info h5 {
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prime-schema-info ul {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    color: #15803d;
}

.prime-schema-info li {
    margin-bottom: 4px;
}

/* ==========================================================================
   Tip
   ========================================================================== */

.prime-schema-tip {
    margin-top: 16px;
    padding: 12px 16px;
    background: #dbeafe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prime-schema-tip .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #1e40af;
    flex-shrink: 0;
}

.prime-schema-tip p {
    margin: 0;
    font-size: 12px;
    color: #1e40af;
}

/* ==========================================================================
   Save Button
   ========================================================================== */

.prime-schema-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    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-schema-save:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

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

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

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

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

/* ==========================================================================
   Module Toggle (top card like Redirects)
   ========================================================================== */

.prime-schema-module-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

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

.prime-schema-module-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.prime-schema-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #1e293b;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    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-schema-toast.visible {
    transform: translateX(0);
}

.prime-schema-toast.success {
    background: #6366f1;
}

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

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

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

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

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

    .prime-schema-row,
    .prime-schema-social-grid {
        grid-template-columns: 1fr;
    }

    .prime-schema-type-selector {
        flex-direction: column;
    }
}
