.mrt-profile-container {
    padding: 20px 15px;
    margin: 15px 0 15px 0;
    border-radius: var(--mrt-radius);
    border: 1px solid #e2e8f0;
}

.mrt-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.mrt-profile-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.02em;
}

.mrt-profile-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding: 4px 0;
}

.mrt-profile-title-input {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 6px 12px;
    margin: 0;
    width: 250px;
    max-width: 100%;
    height: 44px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mrt-profile-title-input:focus {
    outline: none;
    border-color: var(--mrt-primary);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(79, 51, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.mrt-title-edit-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: mrt-fade-in 0.3s ease-out;
}

@keyframes mrt-fade-in {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mrt-edit-title-btn,
.mrt-save-title-btn,
.mrt-cancel-title-btn {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    flex-shrink: 0;
}

.mrt-save-title-btn {
    color: var(--mrt-success, #10b981) !important;
}

.mrt-save-title-btn:hover {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

.mrt-cancel-title-btn {
    color: var(--mrt-danger, #ef4444) !important;
}

.mrt-cancel-title-btn:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.mrt-profile-title-group {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.mrt-profile-role {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 4px;
}

.mrt-profile-info {
    background: #f7fafc;
    border-radius: var(--mrt-radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.mrt-profile-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mrt-profile-details li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 1rem;
}

.mrt-profile-details li:last-child {
    border-bottom: none;
}

.mrt-profile-details strong {
    color: #4a5568;
    min-width: 80px;
}

.mrt-profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.mrt-button {
    display: inline-block;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
    padding: 10px 20px;
    border-radius: var(--mrt-radius);
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    border: 1px solid transparent;
    font-weight: 500;
    background-color: var(--mrt-primary);
    color: white;
    border-color: var(--mrt-primary);
    font-family: inherit;
    box-sizing: border-box;
}

.mrt-button:hover {
    background-color: var(--mrt-primary-hover);
    border-color: var(--mrt-primary-hover);
    color: white;
    text-decoration: none;
}

/* Make button elements match anchor styling */
.mrt-profile-actions button.mrt-button {
    border: none;
    font-family: inherit;
}

.mrt-button-cancel {
    background-color: #6c757d;
    border-color: #6c757d;
    text-align: center;
}

.mrt-button-cancel:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.mrt-profile-form {
    background: #f7fafc;
    border-radius: var(--mrt-radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.mrt-form-group {
    margin-bottom: 25px;
    position: relative;
}

.mrt-unit-toggle-container {
    position: absolute;
    top: 0;
    right: 0;
}

.mrt-unit-toggle {
    display: flex;

    border-radius: var(--mrt-radius);
    padding: 2px;
    position: relative;
    width: 100px;
    height: 30px;
    box-sizing: border-box;
}

.mrt-unit-toggle input[type="radio"] {
    display: none;
}

.mrt-unit-label {
    flex: 1;
    text-align: center;
    z-index: 2;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 26px;
    color: #718096;
    margin: 0;
    transition: color 0.3s ease;
    background: transparent !important;
}

.mrt-unit-toggle input[type="radio"]:checked + .mrt-unit-label {
    color: var(--mrt-primary) !important;
}

.mrt-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 48px;
    height: 26px;
    background: rgb(255, 157, 0);
    border-radius: var(--mrt-radius);
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.mrt-unit-toggle
    input[type="radio"]:nth-of-type(2):checked
    ~ .mrt-toggle-slider {
    transform: translateX(48px);
}

.mrt-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mrt-input-suffix {
    position: absolute;
    right: 12px;
    color: #a0aec0;
    font-size: 0.9rem;
    pointer-events: none;
}

.mrt-height-imperial {
    gap: 10px;
}

.mrt-input-group {
    position: relative;
    flex: 1;
}

.mrt-form-group label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: #4a5568;
}

.mrt-form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    line-height: 1.5;
    color: #2d3748;
    background-color: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: var(--mrt-radius);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.mrt-form-input:focus {
    border-color: var(--mrt-primary);
    box-shadow: 0 0 0 3px rgba(79, 51, 255, 0.1);
    outline: none;
}

/* Force 18px border-radius on date and number inputs */
.mrt-form-input[type="date"],
.mrt-form-input[type="number"] {
    border-radius: var(--mrt-radius);
    -webkit-border-radius: var(--mrt-radius);
    -moz-border-radius: var(--mrt-radius);
}

/* Hide browser default spinners */
.mrt-form-input::-webkit-outer-spin-button,
.mrt-form-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mrt-form-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.mrt-delete-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    background-color: #fff5f5;
    padding: 15px;
    border-radius: var(--mrt-radius);
    border: 1px solid #fed7d7;
}

.mrt-delete-warning {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 8px;
}

.mrt-profile-actions form {
    display: inline;
}

.mrt-profile-actions .mrt-button {
    flex: 1;
    text-align: center;
}

@media (max-width: 768px) {
    .mrt-profile-container {
        padding: 20px 15px;
        margin: 15px 0 15px 0;
    }

    .mrt-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mrt-profile-title {
        font-size: 1.3rem;
    }

    .mrt-profile-details li {
        flex-direction: column;
        gap: 5px;
    }

    .mrt-profile-actions {
        flex-direction: column;
    }

    .mrt-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mrt-profile-title {
        font-size: 1.3rem;
    }

    .mrt-profile-info,
    .mrt-profile-form {
        padding: 15px;
    }

    .mrt-form-group {
        margin-bottom: 15px;
    }
}

/* Login Styles removed - now using inline styles for consistency with other pages */
.mrt-not-logged-in-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

/* Notice Styles */

.mrt-warning-message {
    padding: 12px;
    border-radius: var(--mrt-radius);
    margin-bottom: 15px;
    border: 1px solid #ffeaa7;
}

/* Configuration Styles */
.mrt-profile-configuration {
    margin-top: 30px;
}

.mrt-profile-configuration h6 {
    margin-bottom: 15px;
}

/* Misc Styles */
.mrt-hidden {
    display: none;
}

/* ====================================
   NOTICES & ALERTS
   ==================================== */
.mrt-notice-box {
    padding: 10px;
    border-radius: var(--mrt-radius);
    margin-top: 15px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mrt-notice-box.mrt-notice-trial-active {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
}

.mrt-notice-box.mrt-notice-trial-ended {
    background: #fff3cd;
    border: 1px solid #ffeeba;
}

.mrt-notice-icon {
    font-size: 20px;
}

.mrt-error-text {
    color: red;
    font-weight: bold;
}

/* ==========================================================================
   UNIFIED PREMIUM TOGGLE SYSTEM
   Polished style for all configuration toggles on the profile page.
   Ensures consistent typography, spacing, and switch appearance.
   ========================================================================== */

/* 1. Reset & Standardize Wrappers (The outer containers) */
.mrt-zone-config-container,
.mrt-timeline-upload-container,
.mrt-reminder-config-container,
.mrt-voice-config-container,
.mrt-delete-account-container {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: block !important; /* Forces consistent margin collapsing */
    gap: 0 !important; /* Removes any flex gap interference */
}

/* 2. Standardize Cards (The visible toggle elements) */
.mrt-toggle-card {
    display: block !important;
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 20px !important;
    padding: 22px !important; /* Increased padding for premium feel */
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 15px 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover Effect for Cards */
.mrt-toggle-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Dark Mode Overrides */
html.maxreptracker-dark-mode-enabled .mrt-toggle-card {
    background: rgba(30, 30, 30, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4) !important;
}

/* 3. Header & Text Consistency */
.mrt-zone-switch-header,
.mrtai-switch-header,
.mrt-voice-switch-header,
.mrt-timeline-switch-header,
.mrt-reminder-switch-header,
.maxreptracker-switch-header,
.mrt-delete-account-switch-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mrt-zone-header-left,
.mrtai-header-left,
.mrt-voice-header-left,
.mrt-timeline-header-left,
.mrt-reminder-header-left,
.maxreptracker-header-left,
.mrt-delete-account-header-left {
    flex: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mrt-zone-header-left h4,
.mrtai-header-left h4,
.mrt-voice-header-left h4,
.mrt-timeline-header-left h4,
.mrt-reminder-header-left h4,
.maxreptracker-header-left h4,
.mrt-delete-account-header-left h4 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -0.01em !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Ensure icons use the same uniform color */
.mrt-zone-header-left h4 svg,
.mrtai-header-left h4 svg,
.mrt-voice-header-left h4 svg,
.mrt-timeline-header-left h4 svg,
.mrt-reminder-header-left h4 svg,
.maxreptracker-header-left h4 svg,
.mrt-delete-account-header-left h4 svg {
    color: inherit !important;
    stroke: currentColor !important;
}

html.maxreptracker-dark-mode-enabled
    :is(
        .mrt-zone-header-left,
        .mrtai-header-left,
        .mrt-voice-header-left,
        .mrt-timeline-header-left,
        .mrt-reminder-header-left,
        .maxreptracker-header-left,
        .mrt-delete-account-header-left
    )
    h4 {
    color: #f8fafc !important;
}

.mrt-zone-header-left p,
.mrtai-header-left p,
.mrt-voice-header-left p,
.mrt-timeline-header-left p,
.mrt-reminder-header-left p,
.maxreptracker-header-left p,
.mrt-delete-account-header-left p {
    font-size: 0.95rem !important;
    color: #64748b !important;
    margin: 6px 0 0 0 !important; /* Slightly more gap for clarity */
    padding: 0 !important;
    font-weight: 450 !important;
    line-height: 1.4 !important;
}

html.maxreptracker-dark-mode-enabled
    :is(
        .mrt-zone-header-left,
        .mrtai-header-left,
        .mrt-voice-header-left,
        .mrt-timeline-header-left,
        .mrt-reminder-header-left,
        .maxreptracker-header-left,
        .mrt-delete-account-header-left
    )
    p {
    color: #94a3b8 !important;
}

/* 4. Unified Slider Styling */
.mrt-zone-switch,
.mrtai-switch,
.mrt-voice-switch,
.mrt-timeline-switch,
.mrt-reminder-config-switch,
.maxreptracker-switch,
.mrt-delete-account-switch {
    position: relative !important;
    display: inline-block !important;
    width: 60px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
}

.mrt-zone-slider,
.mrtai-slider,
.mrt-voice-slider,
.mrt-timeline-slider,
.mrt-reminder-config-slider,
.maxreptracker-slider,
.mrt-delete-account-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #cbd5e1 !important;
    border-radius: 32px !important;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html.maxreptracker-dark-mode-enabled
    :is(
        .mrt-zone-slider,
        .mrtai-slider,
        .mrt-voice-slider,
        .mrt-timeline-slider,
        .mrt-reminder-config-slider,
        .maxreptracker-slider,
        .mrt-delete-account-slider
    ) {
    background-color: #475569 !important;
}

.mrt-zone-slider:before,
.mrtai-slider:before,
.mrt-voice-slider:before,
.mrt-timeline-slider:before,
.mrt-reminder-config-slider:before,
.maxreptracker-slider:before,
.mrt-delete-account-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 24px !important;
    width: 24px !important;
    top: 0 !important;
    bottom: 0 !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
    left: 4px !important;
    background-color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    border-radius: 50% !important;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Checked state */
input:checked
    + :is(
        .mrt-zone-slider,
        .mrtai-slider,
        .mrt-voice-slider,
        .mrt-timeline-slider,
        .mrt-reminder-config-slider,
        .maxreptracker-slider,
        .mrt-delete-account-slider
    ) {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

input:checked
    + :is(
        .mrt-zone-slider,
        .mrtai-slider,
        .mrt-voice-slider,
        .mrt-timeline-slider,
        .mrt-reminder-config-slider,
        .maxreptracker-slider,
        .mrt-delete-account-slider
    ):before {
    transform: translateX(28px) !important;
}

/* Locked / Disabled States */
.mrtai-locked,
.mrt-voice-locked {
    opacity: 0.8 !important;
}

.mrtai-slider-locked,
.mrt-voice-slider-locked {
    background-color: #94a3b8 !important;
    cursor: not-allowed !important;
}
/* Dark Mode Adaptations for Profile Title */
html.maxreptracker-dark-mode-enabled .mrt-profile-title {
    color: #f8fafc;
}

html.maxreptracker-dark-mode-enabled .mrt-profile-title-input {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

html.maxreptracker-dark-mode-enabled .mrt-profile-title-input:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--mrt-primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.4);
}

html.maxreptracker-dark-mode-enabled .mrt-edit-title-btn {
    color: #94a3b8 !important;
}

html.maxreptracker-dark-mode-enabled .mrt-edit-title-btn:hover {
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
