/* MietDoc Reusable Component Classes */

/* === Card Variants === */
.md-card {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.md-card--elevated {
    box-shadow: var(--shadow-lg);
}

.md-card--accent {
    border-left: 6px solid var(--brand-primary);
}

.md-card--clickable:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.md-card--hero {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

/* === Button Variants === */
.md-btn--loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.md-btn--loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: var(--radius-full);
    animation: md-spin 0.6s linear infinite;
    margin-left: var(--space-2);
    vertical-align: middle;
}

@keyframes md-spin {
    to { transform: rotate(360deg); }
}

/* === Page Container === */
.md-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}

.md-page--wide {
    max-width: 1100px;
}

/* === Icon Sizing Utilities === */
.md-icon--xl {
    font-size: 3rem !important;
    color: var(--brand-primary);
}

.md-icon--xxl {
    font-size: 4rem !important;
    color: var(--brand-primary);
}

.md-icon--brand {
    color: var(--brand-primary);
}

.md-icon--inline {
    font-size: 1.2rem !important;
    vertical-align: middle;
}

.md-icon--sm {
    font-size: 1rem !important;
    vertical-align: middle;
}

/* === Step Link (wizard navigation) === */
.wizard-steps .step-link {
    text-decoration: none;
    color: inherit;
}

/* === Focus Ring System === */
*:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Don't double-outline Bootstrap components that already handle focus */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.accordion-button:focus-visible {
    outline: none;
}

/* === Tools Navigation (shared across tool pages) === */
.md-tools-nav {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.md-tools-nav a {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: var(--brand-primary-bg);
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--duration-normal) var(--ease-default);
}

.md-tools-nav a:hover,
.md-tools-nav a.active {
    background: var(--brand-primary);
    color: white;
}

/* === Info/Explanation Box === */
.md-info-box {
    background: var(--brand-primary-bg);
    border-left: 4px solid var(--brand-primary);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

/* === Video Embed === */
.md-video-embed {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* === Badge === */
.md-badge--new {
    font-size: 0.7rem;
}

/* === Card with highlight border === */
.md-card--highlight {
    border: 2px solid var(--brand-primary);
}

/* === Button Polish === */
.btn-primary {
    transition: all var(--duration-fast) var(--ease-back);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Gradient CTA buttons */
.md-btn--cta {
    background: linear-gradient(135deg, var(--brand-primary), #6a3d9a);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.md-btn--cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left var(--duration-slow) var(--ease-default);
}

.md-btn--cta:hover::before {
    left: 100%;
}

/* === Typography Polish === */
.md-lead {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.7;
}

h1, .h1 { line-height: 1.1; letter-spacing: -0.02em; }
h2, .h2 { line-height: 1.2; }
h3, .h3 { line-height: 1.3; }

/* === Divider === */
.md-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
    margin: var(--space-8) 0;
}

/* === Section alternation === */
.md-section-alt {
    background: var(--neutral-50);
    padding: var(--space-12) 0;
}
