/**
 * AEU Terms & Conditions Widget Styles
 */

/* Wrapper - Two Column Layout */
.aeu-terms-wrapper {
    display: flex;
    gap: 40px;
    position: relative;
    align-items: flex-start;
}

/* Navigation Column */
.aeu-terms-nav {
    width: 300px;
    min-width: 300px;
    flex-shrink: 0;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    align-self: flex-start;
}

.aeu-terms-nav-sticky {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 120px !important;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* WordPress admin bar adjustment */
.admin-bar .aeu-terms-nav-sticky {
    top: 152px !important;
}

/* Fix Elementor container overflow issues that break sticky */
.elementor-widget-aeu_terms_conditions,
.elementor-widget-aeu_terms_conditions > .elementor-widget-container {
    overflow: visible !important;
}

/* Ensure parent sections don't break sticky */
.elementor-section:has(.aeu-terms-wrapper),
.elementor-container:has(.aeu-terms-wrapper),
.elementor-column:has(.aeu-terms-wrapper),
.elementor-widget-wrap:has(.aeu-terms-wrapper) {
    overflow: visible !important;
}

/* Navigation Title */
.aeu-terms-nav-title {
    font-size: 18px;
    font-weight: 700;
    color: #2f3a3f;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff8300;
}

/* Navigation List */
.aeu-terms-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aeu-terms-nav-list li {
    margin-bottom: 5px;
}

/* Navigation Links */
.aeu-terms-nav-link {
    display: block;
    padding: 10px 15px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    border-left: 3px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
}

.aeu-terms-nav-link:hover {
    color: #ff8300;
    background: rgba(255, 131, 0, 0.08);
    border-left-color: #ffc300;
}

.aeu-terms-nav-link.active {
    color: #ff8300;
    background: rgba(255, 131, 0, 0.12);
    border-left-color: #ff8300;
    font-weight: 600;
}

/* Content Column */
.aeu-terms-content {
    flex: 1;
    min-width: 0;
    padding: 20px 0;
}

/* Content Typography */
.aeu-terms-content h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2f3a3f;
    margin: 40px 0 20px 0;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    scroll-margin-top: 100px;
}

.aeu-terms-content h1:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.aeu-terms-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin: 30px 0 15px 0;
}

.aeu-terms-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin: 25px 0 12px 0;
}

.aeu-terms-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 15px;
}

.aeu-terms-content ul,
.aeu-terms-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.aeu-terms-content li {
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 8px;
}

.aeu-terms-content strong {
    font-weight: 600;
    color: #2f3a3f;
}

.aeu-terms-content a {
    color: #ff8300;
    text-decoration: none;
}

.aeu-terms-content a:hover {
    text-decoration: underline;
}

.aeu-terms-content hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 30px 0;
}

/* Table styling for terms content */
.aeu-terms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.aeu-terms-content table th,
.aeu-terms-content table td {
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    text-align: left;
}

.aeu-terms-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Navigation Scrollbar */
.aeu-terms-nav-sticky::-webkit-scrollbar {
    width: 6px;
}

.aeu-terms-nav-sticky::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.aeu-terms-nav-sticky::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.aeu-terms-nav-sticky::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .aeu-terms-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .aeu-terms-nav {
        width: 100% !important;
        min-width: 100% !important;
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
    }

    .aeu-terms-nav-sticky {
        position: relative;
        top: 0;
        max-height: none;
    }

    .aeu-terms-nav-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .aeu-terms-nav-link {
        font-size: 13px;
        padding: 8px 12px;
    }

    .aeu-terms-content h1 {
        font-size: 20px;
        scroll-margin-top: 20px;
    }
}

@media (max-width: 575px) {
    .aeu-terms-nav-list {
        grid-template-columns: 1fr;
    }

    .aeu-terms-content {
        padding: 15px 0;
    }

    .aeu-terms-content h1 {
        font-size: 18px;
    }

    .aeu-terms-content p,
    .aeu-terms-content li {
        font-size: 14px;
    }
}

/* Last Updated Date */
.aeu-terms-last-updated {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 3px solid #ff8300;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: #495057;
}

.aeu-terms-last-updated-top {
    margin-bottom: 30px;
}

.aeu-terms-last-updated-bottom {
    margin-top: 40px;
}

.aeu-terms-updated-label {
    font-weight: 600;
    color: #2f3a3f;
}

.aeu-terms-updated-date {
    color: #6c757d;
}

/* Print Styles */
@media print {
    .aeu-terms-nav {
        display: none;
    }

    .aeu-terms-content {
        width: 100%;
    }
}
