/* Modern Training Form Design */

:root {
    --primary: #0d6efd;
    --primary-rgb: 13, 110, 253;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
}

/* Container & Card */
.training-container {
    max-width: 28rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.btn-back:hover {
    color: #212529;
}

.btn-back i {
    font-size: 1rem;
}

.training-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.training-card>*+* {
    margin-top: 1.5rem;
}

/* Headers */
.training-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.training-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #212529;
}

.training-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Form Groups */
.form-group-modern {
    margin-bottom: 0;
}

.form-group-modern+.form-group-modern {
    margin-top: 0.75rem;
}

.form-label-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #212529;
}

.form-label-modern.font-semibold {
    font-weight: 600;
}

.label-text {
    display: block;
}

.select-all-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    color: var(--primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.select-all-btn:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

.select-all-btn:active {
    transform: scale(0.95);
}

/* Error Messages */
.error-message {
    font-size: 0.875rem;
    color: var(--danger);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 3px solid var(--danger);
    border-radius: 0.25rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
}

/* Inputs */
.form-input-modern {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

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

.form-input-modern::placeholder {
    color: #adb5bd;
}

/* BMI Display */
.bmi-display {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    animation: fadeInSlide 0.3s ease-out;
    display: none;
}

/* Measurement fields with unit toggles */
.measurement-field {
    margin-bottom: 0.75rem;
}

.measurement-field:last-child {
    margin-bottom: 0;
}

.input-with-unit {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.input-with-unit .form-input-modern {
    flex: 1;
    min-width: 0;
}

.unit-toggle {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.unit-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: white;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.unit-btn:first-child {
    border-right: 1px solid var(--border-color);
}

.unit-btn.selected {
    background: var(--primary);
    color: white;
}

.unit-btn:hover:not(.selected) {
    background: rgba(var(--primary-rgb), 0.08);
}

/* Height slider */
.height-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.height-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.height-value-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.height-slider-track {
    padding: 0.25rem 0;
}

.height-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--primary), var(--primary)) no-repeat, #e0e0e0;
    outline: none;
    cursor: pointer;
}

.height-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.height-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.height-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.height-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.height-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.height-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
}

.height-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
}

@media (max-width: 480px) {
    .height-value-display {
        font-size: 1.25rem;
    }

    .height-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .height-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .unit-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
}

.bmi-display.show {
    display: block;
}

.bmi-display+.form-group-modern {
    margin-top: 0.75rem;
}

.bmi-display-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bmi-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

.bmi-value-container {
    text-align: right;
}

.bmi-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.bmi-category {
    font-size: 0.75rem;
    font-weight: 500;
    display: block;
}

.bmi-category.text-blue {
    color: #0d6efd;
}

.bmi-category.text-green {
    color: #198754;
}

.bmi-category.text-yellow {
    color: #ffc107;
}

.bmi-category.text-red {
    color: #dc3545;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle Button Groups */
.toggle-button-group {
    display: grid;
    gap: 0.5rem;
}

.toggle-button-group.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.toggle-button-group.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.toggle-button-group.cols-1 {
    grid-template-columns: 1fr;
}

.toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

.toggle-button.flex-col {
    flex-direction: column;
}

.toggle-button:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
}

.toggle-button:active {
    transform: scale(0.96);
    background: rgba(var(--primary-rgb), 0.08);
}

.toggle-button.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-button.locked {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

input[readonly].form-input-modern {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-secondary, #f5f5f5);
}

.toggle-button .emoji {
    font-size: 2rem;
    line-height: 1;
}

.toggle-button.small .emoji {
    font-size: 1.25rem;
}

.toggle-button .text {
    font-size: 0.75rem;
    font-weight: 500;
}

.toggle-button .subtext {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.plan-price-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
    margin-top: 0.15rem;
}

.toggle-button.selected .plan-price-tag {
    background: rgba(var(--primary-rgb), 0.15);
}

/* Multi-select Toggle Buttons */
.multi-toggle-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

.multi-toggle-button:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
}

.multi-toggle-button:active {
    transform: scale(0.97);
    background: rgba(var(--primary-rgb), 0.08);
}

.multi-toggle-button.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.multi-toggle-button .emoji {
    font-size: 1.25rem;
}

/* Duration Picker */
.duration-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
}

.duration-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 0.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.duration-option:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.02);
}

.duration-option:active {
    transform: scale(0.95);
}

.duration-option.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.duration-ring {
    position: relative;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duration-clock {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    color: var(--border-color);
    transition: color 0.2s ease;
}

.duration-option.selected .duration-clock {
    color: var(--primary);
}

.duration-arc {
    transition: stroke-dashoffset 0.4s ease, stroke 0.2s ease;
}

.duration-number {
    font-size: 0.875rem;
    font-weight: 700;
    color: #495057;
    position: relative;
    z-index: 1;
    transition: color 0.2s ease;
}

.duration-option.selected .duration-number {
    color: var(--primary);
}

.duration-label {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: lowercase;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.duration-option.selected .duration-label {
    color: var(--primary);
    font-weight: 600;
}

/* Checkbox Style for Comorbidities */
.checkbox-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.checkbox-button:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
}

.checkbox-button.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.checkbox-icon {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #ced4da;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.checkbox-button.selected .checkbox-icon {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-icon svg {
    width: 0.75rem;
    height: 0.75rem;
    color: white;
    display: none;
}

.checkbox-button.selected .checkbox-icon svg {
    display: block;
}

.checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

/* Custom Range Slider */
.slider-container {
    margin-bottom: 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.slider-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

.slider-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
}

.slider-track {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
}

.slider-background {
    height: 3rem;
    background: #e9ecef;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.slider-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.15s ease;
    border-radius: 9999px;
}

.slider-emoji {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    pointer-events: none;
    transition: left 0.15s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.slider-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3rem;
    opacity: 0;
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Submit Button */
.btn-submit-modern {
    width: 100%;
    padding: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 1.5rem;
}

.btn-submit-modern:hover:not(:disabled) {
    background: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-submit-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit-modern:active:not(:disabled) {
    transform: scale(0.98);
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.btn-back:hover {
    color: #212529;
}

.btn-back svg {
    width: 1rem;
    height: 1rem;
}

/* Responsive */
@media (min-width: 640px) {
    .training-header h1 {
        font-size: 2.25rem;
    }

    .training-header p {
        font-size: 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}


.mt-2 {
    margin-top: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

/* Additional Information Textarea */
.form-input-modern[type="textarea"],
.form-input-modern textarea,
textarea.form-input-modern {
    font-family: inherit;
    resize: vertical;
    min-height: 6rem;
    line-height: 1.5;
}

/* Info Icon with Tooltip */
.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.375rem;
    cursor: help;
    color: var(--primary);
    font-size: 1rem;
    transition: color 0.15s ease;
}

.info-icon:hover {
    color: #0a58ca;
}

.info-icon i {
    font-size: 1rem;
}

.info-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: max-content;
    max-width: 20rem;
    padding: 0.75rem;
    background: #212529;
    color: white;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    white-space: normal;
}

.info-icon::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #212529;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.info-icon:hover::before,
.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Form Text Muted */
.form-text-muted {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Subscription Popup */
.subscription-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subscription-backdrop.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.subscription-backdrop.fade-out {
    animation: fadeOut 0.3s ease-out;
}

.subscription-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    z-index: 2001;
}

.subscription-popup.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.subscription-popup.slide-down {
    animation: slideDown 0.3s cubic-bezier(0.7, 0, 0.84, 0);
}

.subscription-popup-content {
    background: white;
    border-radius: 24px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.subscription-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
}

.subscription-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #212529;
}

.subscription-close i {
    font-size: 1rem;
}

.subscription-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.subscription-icon i {
    font-size: 1.5rem;
    color: white;
}

.subscription-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.subscription-message {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.subscription-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    text-align: left;
}

.subscription-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    color: #212529;
}

.subscription-benefits li i {
    font-size: 1.125rem;
    color: #198754;
    flex-shrink: 0;
}

.subscription-benefits li span {
    flex: 1;
}

.subscription-cta {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.subscription-cta:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.4);
}

.subscription-cta:active {
    transform: translateY(0);
}

.subscription-cta i {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.subscription-cta:hover i {
    transform: translateX(4px);
}

.subscription-footer {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.subscription-footer i {
    font-size: 0.875rem;
    color: #198754;
}

.subscription-price-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin: 0 0 0.625rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(255, 107, 107, 0);
    }
}

/* Mobile Responsive - Training Form */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .training-container {
        max-width: 100%;
        padding: 1.5rem 0.75rem;
        overflow-x: hidden;
    }

    .toggle-button-group.cols-3 {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .toggle-button-group.cols-mobile-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .toggle-button {
        padding: 0.875rem 0.75rem;
        font-size: 0.8125rem;
    }

    .toggle-button .emoji {
        font-size: 1.25rem;
    }

    .form-card {
        padding: 1.25rem;
    }

    .training-header h1 {
        font-size: 1.5rem;
    }

    .training-header p {
        font-size: 0.875rem;
    }
}

/* Mobile Responsive - Small Devices */
@media (max-width: 480px) {
    .training-container {
        padding: 1rem 0.5rem;
    }

    .toggle-button {
        padding: 0.75rem 0.625rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }

    .toggle-button .emoji {
        font-size: 1.125rem;
    }

    .form-card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .training-header h1 {
        font-size: 1.25rem;
    }

    .subscription-popup {
        width: 95%;
        max-width: none;
    }

    .subscription-popup-content {
        padding: 1.25rem 1rem;
        border-radius: 20px;
        max-height: 90vh;
    }

    .subscription-title {
        font-size: 1.25rem;
    }

    .subscription-message {
        font-size: 0.8125rem;
    }

    .subscription-benefits li {
        font-size: 0.8125rem;
    }

    .subscription-icon {
        width: 44px;
        height: 44px;
    }

    .subscription-icon i {
        font-size: 1.375rem;
    }
}

/* Payment Form Styles */
.subscription-back {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.subscription-back:hover {
    color: #212529;
}

.payment-form {
    text-align: left;
}

.payment-form-group {
    margin-bottom: 0.625rem;
}

.payment-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.375rem;
}

.payment-form-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.payment-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.payment-form-group input::placeholder {
    color: #adb5bd;
}

.payment-field-error {
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

#payment-element {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

#payment-element.StripeElement--focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* Enhanced wallet payment method display */
#payment-element .p-Tabs {
    margin-bottom: 1rem;
}

#payment-element .p-Tabs-item {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#payment-element .p-Tabs-item:hover {
    transform: translateY(-1px);
}

.subscription-cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Payment form mobile responsive */
@media (max-width: 480px) {
    .payment-form-group input {
        padding: 0.625rem 0.875rem;
        font-size: 0.9375rem;
    }

    #payment-element {
        padding: 0.625rem;
    }
}

/* Payment user info display */
.payment-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #e8f5e9;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #2e7d32;
}

.payment-user-info i {
    font-size: 1.125rem;
}

/* Payment processing overlay — blocks all interaction during payment */
.payment-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.payment-processing-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: processingCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes processingCardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-processing-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.payment-processing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 0.75rem;
}

.payment-processing-card p {
    font-size: 0.9375rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

.payment-processing-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: #adb5bd;
}

.payment-processing-lock i {
    font-size: 0.875rem;
}
