/**
 * Surf Terms Manager - Frontend Styles
 * Popup modals, disclosure markers, and auto-footer
 */

/* =========================================================================
   DISCLOSURE MARKER TRIGGER BUTTON
   ========================================================================= */

.surf-popup-trigger {
    background: none;
    border: none;
    color: inherit;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.75em;
    vertical-align: super;
    padding: 0 2px;
    line-height: 1;
    font-family: inherit;
}

.surf-popup-trigger:hover {
    text-decoration: underline;
}

.surf-popup-trigger:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}


/* =========================================================================
   POPUP MODAL (using <dialog> element)
   ========================================================================= */

#surf-popup-container {
    /* Container is just a wrapper, dialog handles positioning */
}

.surf-popup-modal:not([open]) {
    display: none;
}

.surf-popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    padding: 0;
    border: none;
    z-index: 100000;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.surf-popup-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.surf-popup-modal[open] {
    animation: surf-popup-in 0.2s ease-out;
}

@keyframes surf-popup-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Modal header */
.surf-popup-modal header {
    background: #1a1a2e;
    color: #fff;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.surf-popup-modal .surf-popup-title {
    font-size: 1.1rem;
	color:#fff;
    font-weight: 600;
    margin: 0;
}

.surf-popup-modal .surf-popup-close-x {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.surf-popup-modal .surf-popup-close-x:hover {
    opacity: 1;
}

/* Modal content */
.surf-popup-modal .surf-popup-content {
    padding: 20px;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    overflow-y: auto;
    flex: 1;
}

.surf-popup-modal .surf-popup-content p {
    margin: 0 0 15px 0;
}

.surf-popup-modal .surf-popup-content p:last-child {
    margin-bottom: 0;
}

/* Modal footer */
.surf-popup-modal footer {
    padding: 16px 20px;
    background: #f5f7fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid #e5e7eb;
}

.surf-popup-modal .surf-popup-terms-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9rem;
}

.surf-popup-modal .surf-popup-terms-link:hover {
    text-decoration: underline;
}

.surf-popup-modal .surf-popup-close {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.surf-popup-modal .surf-popup-close:hover {
    background: #0055aa;
}


/* =========================================================================
   DISCLAIMER BLOCKS (inline and block formats)
   ========================================================================= */

.surf-disclaimer {
    margin-bottom: 15px;
}

.surf-disclaimer p {
    margin: 0;
}

.surf-disclaimer-symbol {
    color: #0066cc;
    font-weight: bold;
    margin-right: 4px;
}

.surf-disclaimer-inline {
    /* Inline disclaimer text */
}

.surf-disclaimer-inline .surf-disclaimer-symbol {
    vertical-align: super;
    font-size: 0.8em;
}


/* =========================================================================
   AUTO-COLLECTING FOOTER
   ========================================================================= */

.surf-disclaimers-footer {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #6b7280;
}

.surf-disclaimers-heading {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #374151;
}

.surf-disclaimer-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.surf-disclaimer-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.surf-disclaimers-footer .surf-disclaimer-symbol {
    color: #0066cc;
    font-weight: bold;
    margin-right: 5px;
}

.surf-disclaimers-footer .surf-disclaimer-text {
    /* Text content */
}

.surf-disclaimers-footer .surf-disclaimer-link {
    color: #0066cc;
    text-decoration: none;
    margin-left: 8px;
    white-space: nowrap;
}

.surf-disclaimers-footer .surf-disclaimer-link:hover {
    text-decoration: underline;
}

/* Dark background variant (for dark footers) */
.surf-disclaimers-footer.surf-dark {
    color: #9ca3af;
}

.surf-disclaimers-footer.surf-dark .surf-disclaimers-heading {
    color: #d1d5db;
}

.surf-disclaimers-footer.surf-dark .surf-disclaimer-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.surf-disclaimers-footer.surf-dark .surf-disclaimer-symbol,
.surf-disclaimers-footer.surf-dark .surf-disclaimer-link {
    color: #60a5fa;
}


/* =========================================================================
   LEGAL DOCUMENT OUTPUT
   ========================================================================= */

.surf-terms-document {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e5e7eb;
}

.surf-terms-document:last-child {
    border-bottom: none;
}

.surf-terms-document h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.surf-terms-updated {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.surf-terms-content {
    color: #444;
    line-height: 1.8;
}

.surf-terms-content p {
    margin-bottom: 15px;
}

.surf-terms-content h3 {
    font-size: 1.25rem;
    margin: 30px 0 15px 0;
    color: #1a1a2e;
}

.surf-terms-content h4 {
    font-size: 1.1rem;
    margin: 25px 0 10px 0;
    color: #1a1a2e;
}

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

.surf-terms-content li {
    margin-bottom: 8px;
}


/* =========================================================================
   EXPIRED PROMO MESSAGE
   ========================================================================= */

.surf-promo-expired {
    background: #f5f7fa;
    color: #6b7280;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    font-style: italic;
    text-align: center;
}


/* =========================================================================
   LIGHT THEME VARIANT FOR POPUP
   ========================================================================= */

.surf-popup-modal.surf-theme-light header {
    background: #f5f7fa;
    color: #1a1a2e;
    border-bottom: 1px solid #e5e7eb;
}

.surf-popup-modal.surf-theme-light .surf-popup-close-x {
    color: #6b7280;
}

.surf-popup-modal.surf-theme-light .surf-popup-close-x:hover {
    color: #1a1a2e;
}