/* Dialog Typography System */

/* Typography Scale and Base Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--dialog-font-family);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--dialog-space-md) 0;
    color: var(--dialog-text-primary);
}

p {
    font-family: var(--dialog-font-family);
    font-size: var(--dialog-font-size-base);
    line-height: 1.6;
    margin: 0 0 var(--dialog-space-md) 0;
    color: var(--dialog-text-secondary);
}

/* Heading Styles */
h1, .dialog-h1 {
    font-size: var(--dialog-font-size-2xl);
    font-weight: 700;
    line-height: 1.1;
}

h2, .dialog-h2 {
    font-size: var(--dialog-font-size-xl);
    font-weight: 700;
    line-height: 1.2;
}

h3, .dialog-h3 {
    font-size: var(--dialog-font-size-lg);
    font-weight: 600;
    line-height: 1.3;
}

h4, .dialog-h4 {
    font-size: var(--dialog-font-size-base);
    font-weight: 600;
    line-height: 1.4;
}

h5, .dialog-h5 {
    font-size: var(--dialog-font-size-sm);
    font-weight: 600;
    line-height: 1.4;
}

h6, .dialog-h6 {
    font-size: var(--dialog-font-size-xs);
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.0.3125rem;
}

/* Display Headings (Extra Large) */
.dialog-display-1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.0625rem;
}

.dialog-display-2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.0.3125rem;
}

.dialog-display-3 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Body Text Variations */
.dialog-body-lg {
    font-size: var(--dialog-font-size-lg);
    line-height: 1.5;
}

.dialog-body {
    font-size: var(--dialog-font-size-base);
    line-height: 1.6;
}

.dialog-body-sm {
    font-size: var(--dialog-font-size-sm);
    line-height: 1.5;
}

.dialog-caption {
    font-size: var(--dialog-font-size-xs);
    line-height: 1.4;
    color: var(--dialog-text-muted);
}

/* Font Weight Classes */
.dialog-font-light { font-weight: 300; }
.dialog-font-normal { font-weight: 400; }
.dialog-font-medium { font-weight: 500; }
.dialog-font-semibold { font-weight: 600; }
.dialog-font-bold { font-weight: 700; }
.dialog-font-extrabold { font-weight: 800; }

/* Text Alignment */
.dialog-text-left { text-align: left; }
.dialog-text-center { text-align: center; }
.dialog-text-right { text-align: right; }
.dialog-text-justify { text-align: justify; }

/* Text Transform */
.dialog-text-uppercase { text-transform: uppercase; }
.dialog-text-lowercase { text-transform: lowercase; }
.dialog-text-capitalize { text-transform: capitalize; }
.dialog-text-normal-case { text-transform: none; }

/* Letter Spacing */
.dialog-tracking-tight { letter-spacing: -0.0.3125rem; }
.dialog-tracking-normal { letter-spacing: 0; }
.dialog-tracking-wide { letter-spacing: 0.0.3125rem; }
.dialog-tracking-wider { letter-spacing: 0.0625rem; }

/* Line Height */
.dialog-leading-none { line-height: 1; }
.dialog-leading-tight { line-height: 1.2; }
.dialog-leading-normal { line-height: 1.5; }
.dialog-leading-relaxed { line-height: 1.6; }
.dialog-leading-loose { line-height: 2; }

/* Special Typography Styles */

/* Brand Heading (with Dialog gradient) */
.dialog-brand-heading {
    background: linear-gradient(135deg, var(--dialog-primary) 0%, var(--dialog-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Highlighted Text */
.dialog-highlight {
    background-color: var(--dialog-primary-light);
    color: var(--dialog-primary);
    padding: 0.125rem 0.375rem;
    border-radius: var(--dialog-radius-sm);
    font-weight: 600;
}

/* Quote Text */
.dialog-quote {
    font-size: var(--dialog-font-size-lg);
    font-style: italic;
    color: var(--dialog-text-secondary);
    border-left: 0.25rem solid var(--dialog-primary);
    padding-left: var(--dialog-space-lg);
    margin: var(--dialog-space-xl) 0;
}

/* Lead Text (Introduction paragraph) */
.dialog-lead {
    font-size: var(--dialog-font-size-lg);
    font-weight: 400;
    line-height: 1.5;
    color: var(--dialog-text-secondary);
    margin-bottom: var(--dialog-space-lg);
}

/* Small Print */
.dialog-small {
    font-size: var(--dialog-font-size-xs);
    color: var(--dialog-text-muted);
    line-height: 1.4;
}

/* Links */
a, .dialog-link {
    color: var(--dialog-primary);
    text-decoration: none;
    transition: color var(--dialog-transition-fast);
}

a:hover, .dialog-link:hover {
    color: var(--dialog-primary-dark);
    text-decoration: underline;
}

a:focus, .dialog-link:focus {
    outline: 0.125rem solid var(--dialog-primary);
    outline-offset: 0.125rem;
}

/* Link Variants */
.dialog-link-muted {
    color: var(--dialog-text-muted);
}

.dialog-link-muted:hover {
    color: var(--dialog-text-secondary);
}

/* Lists */
ul, ol {
    margin: 0 0 var(--dialog-space-md) var(--dialog-space-lg);
    padding: 0;
}

li {
    margin-bottom: var(--dialog-space-sm);
    line-height: 1.5;
}

/* Custom List Styles */
.dialog-list-unstyled {
    list-style: none;
    margin-left: 0;
}

.dialog-list-inline {
    list-style: none;
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--dialog-space-md);
}

.dialog-list-spaced li {
    margin-bottom: var(--dialog-space-md);
}

/* Feature List (with checkmarks) */
.dialog-list-features {
    list-style: none;
    margin-left: 0;
}

.dialog-list-features li {
    position: relative;
    padding-left: var(--dialog-space-lg);
    margin-bottom: var(--dialog-space-md);
}

.dialog-list-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--dialog-primary);
    font-weight: 700;
    font-size: var(--dialog-font-size-base);
}

/* Text Truncation */
.dialog-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dialog-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.dialog-truncate-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Responsive Typography */
@media (max-width: 48rem) {
    h1, .dialog-h1 {
        font-size: var(--dialog-font-size-xl);
    }
    
    h2, .dialog-h2 {
        font-size: var(--dialog-font-size-lg);
    }
    
    .dialog-display-1 {
        font-size: 2.25rem;
    }
    
    .dialog-display-2 {
        font-size: 2rem;
    }
    
    .dialog-display-3 {
        font-size: 1.75rem;
    }
    
    .dialog-lead {
        font-size: var(--dialog-font-size-base);
    }
}

/* Print Styles */
@media print {
    * {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
}
