/* SDP Analyzer - Tool-specific styles. Nav/footer/hero provided by site includes. */

:root {
    --wink-slate-900: #0f172a;
    --wink-slate-800: #1e293b;
    --wink-slate-700: #334155;
    --wink-slate-600: #475569;
    --wink-slate-500: #64748b;
    --wink-slate-400: #94a3b8;
    --wink-slate-300: #cbd5e1;
    --wink-slate-200: #e2e8f0;
    --wink-slate-100: #f1f5f9;
    --wink-slate-50: #f8fafc;
    --wink-sky: #38bdf8;
    --wink-sky-dark: #0ea5e9;
    --wink-sky-deeper: #0284c7;
    --wink-white: #ffffff;
    --wink-success: #22c55e;
    --wink-success-bg: #dcfce7;
    --wink-success-text: #166534;
    --wink-warning: #eab308;
    --wink-warning-bg: #fef9c3;
    --wink-warning-text: #854d0e;
    --wink-danger: #ef4444;
    --wink-danger-bg: #fee2e2;
    --wink-danger-text: #991b1b;
    --wink-info: #38bdf8;
    --wink-info-bg: #e0f2fe;
    --wink-info-text: #075985;
    --wink-code-bg: #0f172a;
    --wink-code-text: #e2e8f0;
}

/* ======================== TOOL TABS ======================== */
.wink-tool-section {
    padding: 40px 0 0;
}

/* Bootstrap utilities missing from site's stripped build */
.d-flex { display: flex !important; }
.gap-2 { gap: 0.5rem !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.flex-wrap { flex-wrap: wrap !important; }
.text-muted { color: #6c757d !important; }
.text-center { text-align: center !important; }
.text-decoration-none { text-decoration: none !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.p-0 { padding: 0 !important; }
.pt-4 { padding-top: 1.5rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.small { font-size: 0.875em !important; }
.form-control-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.2rem; }
.form-select-sm { padding: 0.25rem 2rem 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.2rem; }
.form-switch { padding-left: 2.5em; }
.form-check-input { width: 1em; height: 1em; margin-top: 0.25em; vertical-align: top; }
.form-switch .form-check-input { width: 2em; margin-left: -2.5em; border-radius: 2em; }
.input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.input-group > .form-control { position: relative; flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group > .btn { position: relative; z-index: 2; }
.input-group-sm > .form-control { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.collapse:not(.show) { display: none; }
.collapse.show { display: block; }
.table { width: 100%; margin-bottom: 1rem; vertical-align: top; border-color: #dee2e6; }
.table > :not(caption) > * > * { padding: 0.5rem; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: inherit; }
.table > thead { vertical-align: bottom; }
.table-sm > :not(caption) > * > * { padding: 0.25rem; }

/* Grid classes missing from site's stripped Bootstrap build
   !important needed to override .row>* { width:100% } from boot.min.css */
@media (min-width: 992px) {
    .col-lg-5 { flex: 0 0 auto !important; width: 41.666667% !important; }
    .col-lg-7 { flex: 0 0 auto !important; width: 58.333333% !important; }
    .col-lg-8 { flex: 0 0 auto !important; width: 66.666667% !important; }
    .col-lg-10 { flex: 0 0 auto !important; width: 83.333333% !important; }
}
@media (min-width: 768px) {
    .col-md-5 { flex: 0 0 auto !important; width: 41.666667% !important; }
    .col-md-8 { flex: 0 0 auto !important; width: 66.666667% !important; }
}

/* Nav/tab base styles (site Bootstrap build doesn't include these) */
.wink-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid var(--wink-slate-200);
    margin-bottom: 24px;
}

.wink-tabs .nav-item {
    margin-bottom: -2px;
}

.wink-tabs .nav-link {
    display: inline-block;
    color: var(--wink-slate-500);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    padding: 12px 20px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    background: none;
    cursor: pointer;
    text-decoration: none;
}

.wink-tabs .nav-link.active {
    color: var(--wink-slate-900);
    border-bottom-color: var(--wink-sky-dark);
    background: none;
}

.wink-tabs .nav-link:hover:not(.active) {
    color: var(--wink-slate-700);
    border-bottom-color: var(--wink-slate-300);
}

/* Tab pane visibility (replaces Bootstrap tab-pane/fade/show) */
.tab-content > .tab-pane {
    display: none !important;
    opacity: 1 !important;
}

.tab-content > .tab-pane.active {
    display: block !important;
}

/* ======================== CARDS ======================== */
.card {
    border: 1px solid var(--wink-slate-200);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.25rem;
    background: var(--wink-white);
}

.card-header {
    background-color: var(--wink-slate-50);
    border-bottom: 1px solid var(--wink-slate-200);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    color: var(--wink-slate-900);
}

/* ======================== FORMS ======================== */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--wink-slate-700);
    margin-bottom: 4px;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid var(--wink-slate-300);
    font-size: 0.9rem;
    color: var(--wink-slate-700);
}

.form-control:focus, .form-select:focus {
    border-color: var(--wink-sky-dark);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

textarea.form-control {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--wink-slate-700);
}

/* ======================== BUTTONS ======================== */
.btn-wink {
    background: var(--wink-slate-900);
    color: var(--wink-white);
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-wink:hover {
    background: var(--wink-slate-800);
    color: var(--wink-white);
}

.btn-wink-outline {
    background: transparent;
    color: var(--wink-slate-600);
    border: 1px solid var(--wink-slate-300);
    font-weight: 500;
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-wink-outline:hover {
    border-color: var(--wink-slate-900);
    color: var(--wink-slate-900);
}

.btn-wink-sm {
    padding: 6px 16px;
    font-size: 0.825rem;
}

.btn-wink-sky {
    background: var(--wink-sky-dark);
    color: var(--wink-white);
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-wink-sky:hover {
    background: var(--wink-sky-deeper);
    color: var(--wink-white);
}

/* Sample buttons */
.sample-btn {
    font-size: 0.78rem;
    font-weight: 500;
    margin-right: 4px;
    margin-bottom: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--wink-slate-100);
    color: var(--wink-slate-600);
    border: 1px solid var(--wink-slate-200);
    cursor: pointer;
    transition: all 0.15s;
}

.sample-btn:hover {
    background: var(--wink-slate-200);
    color: var(--wink-slate-900);
    border-color: var(--wink-slate-300);
}

/* ======================== OUTPUT BLOCKS ======================== */
.output-block {
    background-color: var(--wink-code-bg);
    color: var(--wink-code-text);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
    margin-bottom: 0;
    min-height: 60px;
    overflow-x: auto;
}

.output-block:empty::before {
    content: 'Output will appear here...';
    color: var(--wink-slate-500);
    font-style: italic;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--wink-slate-400);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.15);
    color: var(--wink-white);
}

.copy-btn.copied {
    background: var(--wink-success);
    color: var(--wink-white);
    border-color: var(--wink-success);
}

/* ======================== VALIDATION ======================== */
.validation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-item {
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.validation-item .v-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

.validation-ok {
    background-color: var(--wink-success-bg);
    color: var(--wink-success-text);
}

.validation-ok .v-badge {
    background: var(--wink-success);
    color: white;
}

.validation-info {
    background-color: var(--wink-info-bg);
    color: var(--wink-info-text);
}

.validation-info .v-badge {
    background: var(--wink-sky-dark);
    color: white;
}

.validation-warning {
    background-color: var(--wink-warning-bg);
    color: var(--wink-warning-text);
}

.validation-warning .v-badge {
    background: var(--wink-warning);
    color: white;
}

.validation-error {
    background-color: var(--wink-danger-bg);
    color: var(--wink-danger-text);
}

.validation-error .v-badge {
    background: var(--wink-danger);
    color: white;
}

/* ======================== SUMMARY TABLES ======================== */
.summary-table {
    font-size: 0.875rem;
}

.summary-table th {
    width: 175px;
    font-weight: 500;
    color: var(--wink-slate-500);
    background-color: var(--wink-slate-50);
    border-color: var(--wink-slate-200);
    padding: 8px 12px;
}

.summary-table td {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    color: var(--wink-slate-900);
    border-color: var(--wink-slate-200);
    padding: 8px 12px;
}

/* ======================== TRACK CARDS ======================== */
.track-card {
    border-left: 4px solid var(--wink-sky-dark);
}

.track-card.track-video {
    border-left-color: var(--wink-sky-dark);
}

.track-card.track-audio {
    border-left-color: var(--wink-success);
}

.track-card.track-application {
    border-left-color: var(--wink-warning);
}

/* ======================== QUICK TOOLS ======================== */
.quick-tool {
    border: 1px solid var(--wink-slate-200);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: var(--wink-white);
}

.quick-tool h6 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--wink-slate-900);
}

.quick-tool .text-muted {
    color: var(--wink-slate-500) !important;
}

/* ======================== SEO SECTION ======================== */
.wink-seo {
    background: linear-gradient(135deg, var(--wink-slate-50) 0%, #e9ecef 100%);
    padding: 60px 0;
    margin-top: 50px;
}

.wink-seo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wink-slate-900);
    margin-bottom: 20px;
}

.wink-seo p {
    font-size: 1rem;
    color: var(--wink-slate-600);
    line-height: 1.8;
    max-width: 800px;
}

.wink-seo code {
    background: rgba(15, 23, 42, 0.06);
    color: var(--wink-slate-900);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* ======================== ANNOTATED SDP OUTPUT ======================== */
.sdp-annotated {
    padding: 0;
}

.sdp-line-group {
    border-bottom: 1px solid var(--wink-slate-200);
    padding: 10px 16px;
}

.sdp-line-group:last-child {
    border-bottom: none;
}

.sdp-line-code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    color: var(--wink-slate-900);
    font-weight: 600;
    line-height: 1.5;
    word-break: break-all;
}

.sdp-line-explain {
    font-size: 0.8rem;
    color: var(--wink-slate-500);
    margin-top: 3px;
    line-height: 1.5;
}

/* ======================== FORM EXTRAS ======================== */
.form-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wink-slate-400);
    margin-top: 12px;
    margin-bottom: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--wink-slate-100);
}

.form-hint {
    font-size: 0.78rem;
    color: var(--wink-slate-400);
    line-height: 1.5;
    margin-bottom: 8px;
}

.form-toggle-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--wink-slate-500);
    text-decoration: none;
    cursor: pointer;
}

.form-toggle-link:hover {
    color: var(--wink-sky-dark);
}

.form-toggle-link::before {
    content: "\25B8 ";
}

[aria-expanded="true"].form-toggle-link::before {
    content: "\25BE ";
}

/* Form switch styling */
.form-check-input:checked {
    background-color: var(--wink-sky-dark);
    border-color: var(--wink-sky-dark);
}

/* ======================== PLACEHOLDER STATES ======================== */
.wink-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--wink-slate-400);
}

.wink-placeholder p {
    margin-bottom: 8px;
}

.wink-placeholder strong {
    color: var(--wink-slate-600);
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
    .output-block {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    .wink-tabs .nav-link {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    .wink-seo {
        padding: 40px 0;
    }
}
