/**
 * SEO SERP Snippet Optimizer - WordPress Plugin Styles
 * Version: 1.0.0
 */

/* Reset and base styles */
.sso-container * {
    box-sizing: border-box;
}

.sso-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
}

/* Typography */

/* Layout */
.sso-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .sso-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    

}

/* Cards */
.sso-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
}

.sso-card-header {
    padding: 24px 24px 0 24px;
}

.sso-card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1f2937;
}

.sso-card-content {
    padding: 0 24px 24px 24px;
}

/* Form elements */
.sso-input-group {
    margin-bottom: 24px;
}

.sso-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 8px;
}

.sso-input,
.sso-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: all 0.2s ease;
}

.sso-input:focus,
.sso-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Counters */
.sso-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.875rem;
}

.sso-char-count {
    color: #6b7280;
}

.sso-pixel-count {
    color: #6b7280;
}

.sso-pixel-count.warning {
    color: #ef4444;
    font-weight: 500;
}

.sso-pixel-count.caution {
    color: #f59e0b;
    font-weight: 500;
}

/* Warnings */
.sso-warning {
    margin-top: 8px;
    font-size: 0.875rem;
}

.sso-warning.error {
    color: #ef4444;
}

.sso-warning.success {
    color: #10b981;
}

/* Toggle switch */
.sso-toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.sso-toggle-label {
    font-weight: 500;
    color: #1f2937;
}

.sso-toggle-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.sso-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

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

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

input:checked + .sso-slider {
    background-color: #3b82f6;
}

input:checked + .sso-slider:before {
    transform: translateX(20px);
}

/* Guidelines */
.sso-guidelines {
    space-y: 12px;
}

.sso-guideline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.sso-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    margin-top: 8px;
    flex-shrink: 0;
}

.sso-bullet-blue {
    background-color: #3b82f6;
}

.sso-bullet-green {
    background-color: #10b981;
}

.sso-bullet-purple {
    background-color: #8b5cf6;
}

.sso-guideline-item p {
    margin: 0;
    font-size: 0.875rem;
    color: #4b5563;
}

/* Preview panel */
.sso-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sso-device-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sso-device-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.sso-toggle-buttons {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
}

.sso-device-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.sso-device-btn-active {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Google simulation */
.sso-google-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.sso-google-logo {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sso-google-g {
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.sso-search-bar {
    flex: 1;
    background: #f3f4f6;
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.875rem;
}

.sso-google-nav {
    display: flex;
    gap: 24px;
    font-size: 0.875rem;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 24px;
}

.sso-nav-active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 8px;
}

.sso-nav-item:hover {
    color: #1f2937;
    cursor: pointer;
}

/* SERP Preview */
.sso-serp-preview {
    margin-bottom: 32px;
}

.sso-serp-preview[data-device="mobile"] {
    max-width: 360px;
}

.sso-serp-preview[data-device="desktop"] {
    max-width: 600px;
}

.sso-serp-result {
    background: #ffffff;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: arial, sans-serif;
}

.sso-serp-title {
    font-size: 20px;
    line-height: 1.3;
    color: #1a0dab;
    text-decoration: none;
    cursor: pointer;
    margin: 0 0 4px 0;
    font-weight: 400;
}

.sso-serp-title:hover {
    text-decoration: underline;
}

.sso-serp-url {
    font-size: 14px;
    color: #006621;
    line-height: 1.3;
    margin: 0 0 4px 0;
}

.sso-serp-date {
    font-size: 14px;
    color: #5f6368;
    margin: 0 0 4px 0;
}

.sso-serp-description {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.58;
    margin: 0;
}

/* SEO Scores */
.sso-score-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.sso-scores {
    space-y: 12px;
}

.sso-score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sso-score-label {
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 80px;
    color: #374151;
}

.sso-score-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.sso-score-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.sso-score-fill[data-score="0"] {
    width: 0%;
    background: #e5e7eb;
}

.sso-score-value {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.sso-overall-score {
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-weight: 600;
}

/* Pixel rulers (hidden) */
.sso-pixel-ruler {
    position: absolute;
    visibility: hidden;
    white-space: nowrap;
    font-family: arial, sans-serif;
    left: -9999px;
}

.sso-title-ruler {
    font-size: 20px;
    line-height: 1.3;
}

.sso-url-ruler {
    font-size: 14px;
    line-height: 1.3;
}

.sso-description-ruler {
    font-size: 14px;
    line-height: 1.58;
}

/* Responsive design */
@media (max-width: 768px) {
    .sso-container {
        padding: 16px;
    }
    
    .sso-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .sso-google-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .sso-search-bar {
        width: 100%;
    }
    
    .sso-score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .sso-score-bar {
        width: 100%;
    }
}

/* Utility classes for score colors */
.sso-score-excellent { background: #10b981; }
.sso-score-good { background: #3b82f6; }
.sso-score-fair { background: #f59e0b; }
.sso-score-poor { background: #ef4444; }