/*
 * Cyclograde Modern Design System
 * Based on homepage1.scala.html design and GoodUI principles
 * - Visual hierarchy and clarity
 * - Consistency across pages
 * - Card-based design
 * - Clear CTAs and progress indicators
 * - Whitespace and readability
 */

/* ===============================
   HERO SECTIONS
   =============================== */

/* Modern SaaS Hero (homepage1 style) */
.hero-section-modern {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-radius: 20px;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--foreground);
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.6;
}

/* Page Header Hero (for secondary pages) */
.page-header {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.2;
    z-index: 0;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--gray-dark);
    max-width: 600px;
    margin: 0 auto;
}

/* ===============================
   FEATURE CARDS
   =============================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--gray);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.feature-icon.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.feature-icon.secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

.feature-icon.tertiary {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.feature-icon.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.feature-icon.info {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--gray-dark);
    line-height: 1.6;
}

/* ===============================
   CONTENT SECTIONS
   =============================== */

.content-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.content-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-section-title i {
    color: var(--primary);
}

.content-section p {
    color: var(--gray-dark);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* Showcase Section */
.showcase-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin: 3rem 0;
}

.showcase-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.showcase-description {
    color: var(--gray-dark);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* ===============================
   CTA SECTIONS
   =============================== */

.cta-section {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 20px;
    margin-top: 3rem;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cta-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-button {
    background: white;
    color: var(--primary-dark);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--primary-dark);
}

/* ===============================
   BADGES & TAGS
   =============================== */

.precision-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===============================
   FORM SECTIONS (for newtrack, login, etc.)
   =============================== */

.form-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.form-section-description {
    color: var(--gray-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Modern Input Styling */
.modern-input {
    border: 2px solid var(--gray);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.modern-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.modern-select {
    border: 2px solid var(--gray);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s ease;
}

.modern-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* ===============================
   BUTTONS
   =============================== */

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.35);
    color: white;
}

.btn-light {
    background: var(--gray-light);
    color: var(--foreground);
    border: 1px solid var(--gray);
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-light:hover {
    background: var(--gray);
    color: var(--foreground);
}

/* ===============================
   DATA TABLES
   =============================== */

.modern-table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: linear-gradient(135deg, var(--gray-light) 0%, var(--gray) 100%);
}

.modern-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--foreground);
    border-bottom: 2px solid var(--gray);
}

.modern-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray);
    color: var(--foreground);
}

.modern-table tbody tr:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===============================
   STATS / INFO BOXES
   =============================== */

.stats-box {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-box.secondary {
    border-left-color: var(--secondary);
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}

.stats-box.secondary .stats-icon {
    background: rgba(33, 150, 243, 0.1);
    color: var(--secondary);
}

.stats-content h4 {
    font-size: 0.875rem;
    color: var(--gray-dark);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stats-content p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
}

/* ===============================
   INFO CARDS
   =============================== */

.info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray);
    margin-bottom: 1.5rem;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.info-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.info-card-content {
    color: var(--gray-dark);
    line-height: 1.7;
}

.info-card-content a {
    color: var(--primary);
    font-weight: 500;
}

.info-card-content a:hover {
    color: var(--primary-dark);
}

/* ===============================
   LOGIN / AUTH FORMS
   =============================== */

.auth-container {
    max-width: 450px;
    margin: 2rem auto;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-dark);
}

.auth-form .field {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.auth-form .input-icon-wrapper {
    position: relative;
}

.auth-form .input-icon-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-dark);
}

.auth-form .input-icon-wrapper input {
    padding-left: 3rem;
}

/* ===============================
   COFFEE / DONATE PAGE
   =============================== */

.donate-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 2px solid #ffc107;
    margin: 2rem 0;
}

.donate-icon {
    font-size: 4rem;
    color: #d4920a;
    margin-bottom: 1.5rem;
}

.donate-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #795548;
    margin-bottom: 1rem;
}

.donate-description {
    color: #5d4037;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.donate-button {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.donate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
    color: white;
}

/* ===============================
   SUPPORT BOX (coffee link at bottom)
   =============================== */

.support-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 3rem;
    border: 1px solid var(--gray);
}

.support-box p {
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.support-box .button {
    margin-top: 0.5rem;
}

/* ===============================
   IMAGE DISPLAY
   =============================== */

.image-showcase {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.image-showcase img {
    width: 100%;
    height: auto;
    display: block;
}

.image-rounded {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ===============================
   LISTS
   =============================== */

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--foreground);
    line-height: 1.5;
}

.feature-list li i {
    color: var(--primary);
    margin-top: 0.25rem;
}

.numbered-list {
    counter-reset: list-counter;
    list-style: none;
    padding: 0;
}

.numbered-list li {
    counter-increment: list-counter;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray);
}

.numbered-list li:last-child {
    border-bottom: none;
}

.numbered-list li::before {
    content: counter(list-counter);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ===============================
   PLOT DISPLAY AREA
   =============================== */

.plot-display {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.plot-display img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ===============================
   MAP CONTAINER
   =============================== */

.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ===============================
   RESPONSIVE ADJUSTMENTS
   =============================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .hero-section-modern,
    .page-header {
        padding: 2.5rem 1.5rem;
    }

    .content-section,
    .showcase-section {
        padding: 1.5rem;
    }

    .feature-grid {
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }
}

/* ===============================
   UTILITY CLASSES
   =============================== */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.text-center { text-align: center; }
.text-muted { color: var(--gray-dark); }

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

/* Better focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===============================
   SPEED PROFILE GRAPH
   =============================== */

.speed-graph-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.speed-graph {
    width: 100%;
    max-width: 550px;
    height: auto;
    min-height: 220px;
}

.speed-graph .speed-point-group {
    cursor: pointer;
}

.speed-graph .speed-point-visible {
    /* No transform on hover - keep point stable */
}

.speed-graph .speed-tooltip {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.speed-graph .speed-point-group:hover .speed-tooltip {
    opacity: 1;
}

.speed-graph-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-dark);
}

.speed-graph-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.speed-graph-legend .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary);
}

.speed-graph-legend .legend-dot.flat {
    background-color: var(--primary);
}

.speed-graph-legend .legend-dot.descent {
    background-color: var(--secondary);
}

.speed-graph-legend .legend-dot.climb {
    background-color: #FF9800;
}

/* ===============================
   ENHANCED FORM ELEMENTS
   =============================== */

/* ---- Shared Base Styles ---- */

/* Base checkbox container styles (shared by .modern-checkbox and .tooltip.bordered) */
.checkbox-container-base,
.modern-checkbox,
.tooltip.bordered {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid var(--gray);
    border-radius: var(--form-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.checkbox-container-base:hover,
.modern-checkbox:hover,
.tooltip.bordered:hover {
    border-color: var(--primary-light);
    background: rgba(76, 175, 80, 0.03);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

.checkbox-container-base:has(input:checked),
.modern-checkbox.is-checked,
.modern-checkbox:has(input:checked),
.tooltip.bordered:has(input:checked) {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.08);
}

/* Base custom checkbox input styles */
.modern-checkbox input[type="checkbox"],
.tooltip.bordered label.checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    border: 2px solid var(--gray);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.modern-checkbox input[type="checkbox"]:hover,
.tooltip.bordered label.checkbox input[type="checkbox"]:hover {
    border-color: var(--primary-light);
}

.modern-checkbox input[type="checkbox"]:checked,
.tooltip.bordered label.checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
}

/* Shared checkbox checkmark (::after pseudo-element) */
.modern-checkbox input[type="checkbox"]:checked::after,
.tooltip.bordered label.checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: var(--checkbox-checkmark-left);
    top: var(--checkbox-checkmark-top);
    width: var(--checkbox-checkmark-width);
    height: var(--checkbox-checkmark-height);
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* Accessibility: Focus-visible states for custom form controls */
.modern-checkbox input[type="checkbox"]:focus-visible,
.tooltip.bordered label.checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.radio-card-wrapper .card-header input[type="radio"]:focus-visible,
label.radio .card .card-header input[type="radio"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---- Enhanced Select Dropdown ---- */

.select.modern-select {
    border: none;
    padding: 0;
    height: auto;
}

.select.modern-select select {
    border: 2px solid var(--gray);
    border-radius: var(--form-border-radius);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 1rem;
    background-color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 280px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: auto;
    line-height: 1.5;
}

.select.modern-select select:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

.select.modern-select select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
    outline: none;
}

.select.modern-select::after {
    border-color: var(--primary);
    border-width: 2px;
    right: 1.25rem;
}

/* ---- Checkbox Icon and Label Styles ---- */

.modern-checkbox .checkbox-icon,
.tooltip.bordered label.checkbox .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-container-size);
    height: var(--icon-container-size);
    border-radius: var(--icon-border-radius);
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary);
    flex-shrink: 0;
}

.modern-checkbox .checkbox-label {
    font-weight: 500;
    color: var(--foreground);
    flex: 1;
}

.modern-checkbox .checkbox-help {
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-top: 0.25rem;
}

/* Tooltip enhanced for checkboxes */
.tooltip.bordered.modern-checkbox {
    position: relative;
}

.tooltip.bordered.modern-checkbox .tooltiptext {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    margin-left: 0;
}

/* Enhanced Radio Button Cards */
/* Supports both .radio-card-wrapper class and label.radio elements */
.radio-card-wrapper,
label.radio {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.radio-card-wrapper .card,
label.radio .card {
    border: 2px solid var(--gray);
    border-radius: var(--card-border-radius);
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: 100%;
}

.radio-card-wrapper:hover .card,
label.radio:hover .card {
    border-color: var(--primary-light);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.12);
    transform: translateY(-4px);
}

.radio-card-wrapper.is-selected .card,
.radio-card-wrapper:has(input:checked) .card,
label.radio:has(input:checked) .card {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.2);
    background: rgba(76, 175, 80, 0.03);
}

.radio-card-wrapper .card-header,
label.radio .card .card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 0.75rem;
    background: transparent;
    box-shadow: none;
}

.radio-card-wrapper .card-header input[type="radio"],
label.radio .card .card-header input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    border: 2px solid var(--gray);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.radio-card-wrapper .card-header input[type="radio"]:hover,
label.radio .card .card-header input[type="radio"]:hover {
    border-color: var(--primary-light);
}

.radio-card-wrapper .card-header input[type="radio"]:checked,
label.radio .card .card-header input[type="radio"]:checked {
    border-color: var(--primary);
    background: white;
}

.radio-card-wrapper .card-header input[type="radio"]:checked::after,
label.radio .card .card-header input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: var(--radio-dot-offset);
    top: var(--radio-dot-offset);
    width: var(--checkbox-dot-size);
    height: var(--checkbox-dot-size);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
}

.radio-card-wrapper .radio-card-title {
    font-weight: 600;
    color: var(--foreground);
    font-size: 1rem;
}

.radio-card-wrapper:has(input:checked) .radio-card-title {
    color: var(--primary-dark);
}

label.radio:has(input:checked) .card .card-header {
    color: var(--primary-dark);
}

.radio-card-wrapper .card-content,
label.radio .card .card-content {
    padding: 0.5rem 1.25rem 1.25rem;
}

.radio-card-wrapper .card-content .content,
label.radio .card .card-content .content {
    font-size: 0.9rem;
    color: var(--gray-dark);
    line-height: 1.5;
}

.radio-card-wrapper .card-image,
label.radio .card .card-image {
    margin: 0.5rem 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.radio-card-wrapper .card-image figure {
    margin: 0;
}

/* Grid cell spacing for radio cards */
.grid .cell .radio-card-wrapper,
.grid .cell > label.radio {
    height: 100%;
}

.grid .cell > label.radio .card {
    height: 100%;
}

/* Tooltip-specific styles (non-duplicated) */
.tooltip.bordered {
    width: 100%;
}

.tooltip.bordered label.checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    width: 100%;
}

.tooltip.bordered label.checkbox .fixed-width-label-200 {
    font-weight: 500;
    color: var(--foreground);
    flex: 1;
    width: auto;
}

.tooltip.bordered label.checkbox input[type="checkbox"] {
    margin-left: auto;
}

.tooltip.bordered .tooltiptext {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    margin-left: 0;
    white-space: normal;
}
