/* ============================================================
   LEGAL PAGES STYLES
   CreaSoft Corp - POS Complete
============================================================ */

/* ===== Table of Contents ===== */
.legal-toc {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.legal-toc h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-toc h3 i {
    color: #3b82f6;
}

.legal-toc ol {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 2rem;
}

@media (max-width: 639px) {
    .legal-toc ol {
        columns: 1;
    }
}

.legal-toc li {
    counter-increment: toc-counter;
    margin-bottom: 0.5rem;
    break-inside: avoid;
}

.legal-toc li a {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    padding: 0.375rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.legal-toc li a::before {
    content: counter(toc-counter) ".";
    font-weight: 700;
    color: #3b82f6;
    margin-right: 0.5rem;
    min-width: 1.5rem;
}

.legal-toc li a:hover {
    background: #eff6ff;
    color: #1e40af;
}

/* ===== Legal Content ===== */
.legal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
    .legal-content {
        padding: 3rem;
    }
}

/* ===== Legal Section ===== */
.legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.legal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.legal-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

.legal-section ul {
    list-style: none;
    padding-left: 0;
}

.legal-section ul li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 0.375rem;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
}

.legal-section ol li {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 0.375rem;
}

.legal-section a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.legal-section a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.legal-section code {
    background: #f1f5f9;
    color: #1e40af;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-family: 'Courier New', monospace;
}

/* ===== Highlight Box ===== */
.legal-highlight {
    display: flex;
    gap: 1rem;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0 12px 12px 0;
    padding: 1.25rem;
    margin: 1.25rem 0;
    align-items: flex-start;
}

.legal-highlight > i {
    color: #3b82f6;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.legal-highlight div {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.7;
}

.legal-highlight a {
    color: #1e40af;
    font-weight: 600;
}

/* ===== Info Card ===== */
.legal-info-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.legal-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.legal-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-info-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    min-width: 140px;
    flex-shrink: 0;
}

.legal-info-label i {
    color: #3b82f6;
    width: 16px;
    text-align: center;
}

.legal-info-row a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

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

/* ===== Legal Grid ===== */
.legal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.legal-grid-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s;
}

.legal-grid-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
}

.legal-grid-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.legal-grid-card h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.375rem;
}

.legal-grid-card p {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== Rights List ===== */
.legal-rights-list {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.legal-right-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
    transition: all 0.3s;
}

.legal-right-item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.legal-right-icon {
    width: 36px;
    height: 36px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

/* ===== Legal Table ===== */
.legal-table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.legal-table thead {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.legal-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.legal-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    vertical-align: top;
}

.legal-table tbody tr:hover {
    background: #f8fafc;
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Legal Badges ===== */
.legal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.legal-badge.essential {
    background: #dbeafe;
    color: #1e40af;
}

.legal-badge.analytics {
    background: #d1fae5;
    color: #059669;
}

.legal-badge.marketing {
    background: #fef3c7;
    color: #d97706;
}

.legal-badge.functional {
    background: #ede9fe;
    color: #7c3aed;
}

/* ===== Legal Navigation ===== */
.legal-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.legal-nav-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s;
}

.legal-nav-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    color: #1e40af;
}

.legal-nav-card i:first-child {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.legal-nav-card span {
    flex: 1;
}

.legal-nav-card i:last-child {
    color: #9ca3af;
    transition: transform 0.3s, color 0.3s;
}

.legal-nav-card:hover i:last-child {
    transform: translateX(4px);
    color: #3b82f6;
}

/* ===== Print Styles ===== */
@media print {
    .legal-toc {
        break-after: page;
    }

    .legal-section {
        break-inside: avoid;
    }

    .legal-nav {
        display: none;
    }
}