/* SEO Technical Analyzer - Styles */

:root {
    --sta-primary: #0284c7;
    --sta-primary-dark: #0369a1;
    --sta-primary-light: #0ea5e9;
    --sta-secondary: #0c4a6e;
    --sta-success: #22c55e;
    --sta-warning: #f59e0b;
    --sta-danger: #ef4444;
    --sta-gray-50: #f8fafc;
    --sta-gray-100: #f1f5f9;
    --sta-gray-200: #e2e8f0;
    --sta-gray-300: #cbd5e1;
    --sta-gray-400: #94a3b8;
    --sta-gray-500: #64748b;
    --sta-gray-600: #475569;
    --sta-gray-700: #334155;
    --sta-gray-800: #1e293b;
    --sta-gray-900: #0f172a;
    --sta-radius: 12px;
    --sta-shadow: 0 4px 20px rgba(3, 105, 161, 0.15);
}

.sta-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: var(--sta-radius);
    box-shadow: var(--sta-shadow);
    overflow: hidden;
    border: 1px solid var(--sta-gray-200);
}

.sta-wrapper.sta-compact {
    max-width: 400px;
}

/* Header */
.sta-header {
    background: linear-gradient(135deg, var(--sta-secondary) 0%, var(--sta-primary-dark) 50%, var(--sta-primary) 100%);
    color: white;
    padding: 30px 25px;
    text-align: center;
}

.sta-icon-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.sta-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: default;
}

.sta-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.sta-title {
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sta-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

/* Categories */
.sta-categories {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    background: var(--sta-gray-50);
    border-bottom: 1px solid var(--sta-gray-200);
    flex-wrap: wrap;
}

.sta-category {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--sta-gray-600);
    border: 1px solid var(--sta-gray-200);
    transition: all 0.2s ease;
}

.sta-category:hover {
    border-color: var(--sta-primary);
    color: var(--sta-primary);
}

.sta-cat-icon {
    font-size: 12px;
}

.sta-cat-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form */
.sta-form {
    padding: 25px;
}

.sta-form-main {
    margin-bottom: 20px;
}

.sta-field {
    margin-bottom: 18px;
}

.sta-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sta-gray-700);
}

.sta-field-icon {
    font-size: 16px;
}

.sta-field input,
.sta-field select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid var(--sta-gray-200);
    border-radius: 10px;
    transition: all 0.2s ease;
    background: white;
    color: var(--sta-gray-800);
}

.sta-field input:focus,
.sta-field select:focus {
    outline: none;
    border-color: var(--sta-primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
}

.sta-field input::placeholder {
    color: var(--sta-gray-400);
}

.sta-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--sta-gray-500);
}

/* Optional section */
.sta-form-optional {
    background: var(--sta-gray-50);
    margin: 0 -25px;
    padding: 20px 25px;
    border-top: 1px solid var(--sta-gray-200);
    border-bottom: 1px solid var(--sta-gray-200);
    margin-bottom: 20px;
}

.sta-optional-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--sta-gray-600);
    margin-bottom: 15px;
}

.sta-form-optional .sta-field {
    margin-bottom: 15px;
}

.sta-form-optional .sta-field:last-child {
    margin-bottom: 0;
}

/* Tests preview */
.sta-tests-preview {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid #bae6fd;
}

.sta-tests-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sta-primary-dark);
    margin-bottom: 12px;
}

.sta-tests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.sta-test-item {
    font-size: 12px;
    color: var(--sta-gray-600);
    padding: 4px 0;
}

/* Submit button */
.sta-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--sta-primary-dark) 0%, var(--sta-primary) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sta-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(3, 105, 161, 0.35);
}

.sta-submit:active {
    transform: translateY(0);
}

.sta-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sta-submit-loading {
    display: none;
}

.sta-submit.loading .sta-submit-text {
    display: none;
}

.sta-submit.loading .sta-submit-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sta-submit.loading .sta-submit-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: sta-spin 0.8s linear infinite;
}

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

/* Privacy note */
.sta-privacy {
    text-align: center;
    font-size: 12px;
    color: var(--sta-gray-500);
    margin: 15px 0 0 0;
}

/* Messages */
.sta-message {
    margin: 0 25px 25px;
    padding: 15px 18px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.sta-message.success {
    display: block;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.sta-message.error {
    display: block;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Validation states */
.sta-field.valid input {
    border-color: var(--sta-success);
}

.sta-field.invalid input {
    border-color: var(--sta-danger);
}

.sta-field.invalid .sta-field-hint {
    color: var(--sta-danger);
}

/* Compact mode adjustments */
.sta-compact .sta-header {
    padding: 20px;
}

.sta-compact .sta-icon-grid {
    gap: 8px;
}

.sta-compact .sta-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.sta-compact .sta-title {
    font-size: 20px;
}

.sta-compact .sta-categories {
    display: none;
}

.sta-compact .sta-form {
    padding: 20px;
}

.sta-compact .sta-tests-preview {
    display: none;
}

.sta-compact .sta-form-optional {
    margin: 0 -20px;
    padding: 15px 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .sta-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .sta-header {
        padding: 25px 20px;
    }
    
    .sta-icon-grid {
        gap: 8px;
    }
    
    .sta-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .sta-title {
        font-size: 22px;
    }
    
    .sta-categories {
        padding: 12px 15px;
        gap: 6px;
    }
    
    .sta-category {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .sta-form {
        padding: 20px;
    }
    
    .sta-tests-grid {
        grid-template-columns: 1fr;
    }
    
    .sta-form-optional {
        margin: 0 -20px;
        padding: 15px 20px;
    }
}
