/*
 * dialog-tos.css
 *
 * Terms of Service dialog styles for Voice Flipper.
 */

/* *******************************************************
 * Overlay — highest z-index so nothing can cover it
 * ******************************************************* */

.tos-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
}

/* *******************************************************
 * Dialog container
 * ******************************************************* */

.tos-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 720px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* *******************************************************
 * Header
 * ******************************************************* */

.tos-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #c62828 0%, #7f0000 100%);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.tos-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    flex: 1;
}

.tos-header-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

/* *******************************************************
 * Body — scrollable ToS content
 * ******************************************************* */

.tos-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: white;
    border-bottom: 1px solid #ddd;
}

/* Inner content box — matches managetemplates-show-content */
.tos-body-content {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    background: #fafafa;
    overflow: auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13.33px;
    line-height: 1.5;
    color: #333;
}

/* Match widget-htmleditor content styling for consistent preview */
.tos-body-content h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

.tos-body-content h2 {
    font-size: 1.5em;
    margin: 0.75em 0;
}

.tos-body-content h3 {
    font-size: 1.17em;
    margin: 0.83em 0;
}

.tos-body-content p {
    margin: 1em 0;
}

.tos-body-content ul,
.tos-body-content ol {
    margin: 0.4em 0;
    padding-left: 2em;
}

.tos-body-content blockquote {
    margin: 1em 0;
    padding: 10px 20px;
    border-left: 4px solid #667eea;
}

/* *******************************************************
 * Footer — scroll hint + action buttons
 * ******************************************************* */

.tos-footer {
    flex-shrink: 0;
    padding: 14px 24px;
    background: white;
    border-top: 2px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tos-scroll-hint {
    font-size: 0.82rem;
    color: #888;
    text-align: center;
    transition: opacity 0.3s ease;
}

.tos-scroll-hint.hidden {
    opacity: 0;
    visibility: hidden;
}

.tos-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.tos-btn-accept {
    padding: 11px 36px;
    border-radius: 6px;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    background: #2e7d32;
    background-color: #2e7d32;
    color: white;
    transition: all 0.2s ease;
    min-width: 120px;
}

.tos-btn-accept:hover:not(:disabled) {
    background: #1b5e20;
    background-color: #1b5e20;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.tos-btn-accept:disabled {
    background: #bbb;
    background-color: #bbb;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.tos-btn-reject {
    padding: 11px 36px;
    border-radius: 6px;
    border: 2px solid #c62828;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    background: white;
    color: #c62828;
    transition: all 0.2s ease;
    min-width: 120px;
}

.tos-btn-reject:hover {
    background: #c62828;
    background-color: #c62828;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* *******************************************************
 * Responsive
 * ******************************************************* */

@media (max-width: 600px) {
    .tos-dialog {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .tos-header {
        border-radius: 0;
    }

    .tos-footer {
        border-radius: 0;
    }

    .tos-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .tos-btn-accept,
    .tos-btn-reject {
        width: 100%;
    }
}
