/* ==============================================
   Legal Pages Styles - DNS Checker G Tech Group
   ============================================== */

/* Language toggle */
.lang-toggle {
    display: inline-flex;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    overflow: hidden;
}

.lang-toggle button {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #fff;
    color: #6b7280;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-toggle button.active {
    background: #2563eb;
    color: #fff;
}

.lang-toggle button:hover:not(.active) {
    background: #f3f4f6;
}

/* Bilingual content visibility */
[data-lang="en"] {
    display: none;
}

[data-lang="it"] {
    display: block;
}

html[lang="en"] [data-lang="en"] {
    display: block;
}

html[lang="en"] [data-lang="it"] {
    display: none;
}

/* Legal content typography */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    color: #374151;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.legal-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-content ul {
    list-style-type: disc;
}

.legal-content ol {
    list-style-type: decimal;
}

.legal-content li {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.legal-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-color: #93c5fd;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.legal-content a:hover {
    color: #1d4ed8;
    text-decoration-color: #2563eb;
}

.legal-content strong {
    font-weight: 600;
    color: #111827;
}

/* Cookie table */
.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.legal-content thead th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.legal-content tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.legal-content tbody tr:hover {
    background: #f9fafb;
}

/* Responsive table */
@media (max-width: 640px) {
    .legal-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Breadcrumb */
.legal-breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.legal-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.legal-breadcrumb a:hover {
    text-decoration: underline;
}

.legal-breadcrumb span {
    margin: 0 0.5rem;
    color: #9ca3af;
}

/* Last updated badge */
.legal-updated {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #1e40af;
    margin-bottom: 1.5rem;
}

.legal-updated i {
    margin-right: 0.375rem;
}

/* Info box */
.legal-content .info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.9375rem;
}

/* ==================================
   DARK MODE
   ================================== */
html.dark .lang-toggle {
    border-color: #475569;
}

html.dark .lang-toggle button {
    background: #1e293b;
    color: #94a3b8;
}

html.dark .lang-toggle button.active {
    background: #3b82f6;
    color: #fff;
}

html.dark .lang-toggle button:hover:not(.active) {
    background: #334155;
}

html.dark .legal-content {
    color: #cbd5e1;
}

html.dark .legal-content h2 {
    color: #f1f5f9;
    border-bottom-color: #334155;
}

html.dark .legal-content h3 {
    color: #e2e8f0;
}

html.dark .legal-content strong {
    color: #f1f5f9;
}

html.dark .legal-content a {
    color: #60a5fa;
    text-decoration-color: #3b82f6;
}

html.dark .legal-content a:hover {
    color: #93c5fd;
    text-decoration-color: #60a5fa;
}

html.dark .legal-content thead th {
    background: #1e293b;
    color: #cbd5e1;
    border-bottom-color: #475569;
}

html.dark .legal-content tbody td {
    border-bottom-color: #334155;
}

html.dark .legal-content tbody tr:hover {
    background: #1e293b;
}

html.dark .legal-breadcrumb {
    color: #94a3b8;
}

html.dark .legal-breadcrumb a {
    color: #60a5fa;
}

html.dark .legal-breadcrumb span {
    color: #64748b;
}

html.dark .legal-updated {
    background: #1e3a5f;
    border-color: #2563eb;
    color: #93c5fd;
}

html.dark .legal-content .info-box {
    background: #1e293b;
    border-left-color: #3b82f6;
    color: #cbd5e1;
}

/* Print */
@media print {
    .lang-toggle,
    .legal-breadcrumb {
        display: none;
    }
    .legal-content {
        max-width: 100%;
    }
}
