/* Training Zone Configuration Toggle Styles */
.mrt-zone-config-container {
    margin: 15px 0;
    background: #f9f9f9;
    border-radius: var(--mrt-radius);
}

.mrt-zone-config-toggle {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--mrt-radius);
    padding: 20px;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.mrt-zone-switch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.mrt-zone-header-left {
    flex: 1;
    min-width: 0;
}

.mrt-zone-header-left h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.2em; /* Standardized */
    font-weight: 600;
}

.mrt-zone-header-left p {
    margin: 0;
    color: #666;
    font-size: 1.1em; /* Standardized */
}

.mrt-zone-header-right {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.mrt-zone-switch-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
}

.mrt-zone-switch {
    position: relative;
    display: inline-block;
    width: 60px; /* Standardized */
    height: 34px; /* Standardized */
}

.mrt-zone-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mrt-zone-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition:
        background-color 0.4s,
        box-shadow 0.4s;
    border-radius: var(--mrt-radius); /* Standardized */
}

.mrt-zone-slider:before {
    position: absolute;
    content: "";
    height: 26px; /* Standardized */
    width: 26px; /* Standardized */
    left: 4px; /* Standardized */
    bottom: 4px; /* Standardized */
    background-color: white;
    transition:
        transform 0.4s,
        background-color 0.4s;
    border-radius: 50%;
}

.mrt-zone-switch input:checked + .mrt-zone-slider {
    background: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 100%
    ); /* Standardized */
}

.mrt-zone-switch input:checked + .mrt-zone-slider:before {
    transform: translateX(26px); /* Standardized */
}

/* Configuration Content */
.mrt-zone-config-content {
    background: white;
    border-radius: var(--mrt-radius);
    padding: 20px;
    margin-top: 15px;
}

.mrt-zone-mode-selector,
.mrt-preset-selector {
    margin-bottom: 20px;
}

.mrt-zone-mode-selector h6,
.mrt-preset-selector h6 {
    margin: 0 0 12px 0;
    font-size: 0.95em;
    color: #333;
    font-weight: 600;
}

.mrt-mode-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.mrt-mode-option {
    cursor: pointer;
    position: relative;
}

.mrt-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.mrt-mode-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: var(--mrt-radius);
    padding: 15px;
    transition: all 0.3s ease;
}

.mrt-mode-card strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 1.05em;
}

.mrt-mode-card p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.mrt-mode-option.active .mrt-mode-card,
.mrt-mode-option input[type="radio"]:checked ~ .mrt-mode-card {
    background: #e3f2fd;
    border-color: var(--mrt-primary);
}

.mrt-mode-option:hover .mrt-mode-card {
    border-color: var(--mrt-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Preset Selector */
#mrt-zone-preset {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: var(--mrt-radius);
    font-size: 0.95em;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#mrt-zone-preset:focus {
    outline: none;
    border-color: var(--mrt-primary);
    background: white;
}

/* Save Section */
.mrt-zone-save-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mrt-zone-save-btn {
    background: var(--mrt-primary);
    color: white;
    border: none;
    border-radius: var(--mrt-radius);
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mrt-zone-save-btn:hover {
    background: #3d28cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 51, 255, 0.3); /* Keep rgba or try to abstract */
}

.mrt-zone-save-btn:active {
    transform: translateY(0);
}

.mrt-zone-feedback {
    padding: 10px 15px;
    border-radius: var(--mrt-radius);
    font-size: 0.9em;
    text-align: center;
    display: none;
}

.mrt-zone-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.mrt-zone-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) and (min-width: 481px) {
    .mrt-zone-switch-header {
        gap: 5px;
    }
}

@media (max-width: 480px) and (min-width: 376px) {
    .mrt-zone-config-toggle {
        padding: 14px;
    }

    .mrt-zone-switch-header {
        gap: 5px;
    }

    .mrt-zone-header-left h4 {
        font-size: 1em;
    }

    .mrt-zone-header-left p {
        font-size: 0.9em;
    }

    .mrt-zone-switch {
        height: 28px; /* Standardized Mobile Landscape */
        width: 52px; /* Standardized Mobile Landscape */
    }

    .mrt-zone-slider::before,
    .mrt-zone-slider:before {
        height: 20px; /* Standardized */
        width: 20px; /* Standardized */
        left: 4px;
        bottom: 4px;
    }

    .mrt-zone-switch input:checked + .mrt-zone-slider::before,
    .mrt-zone-switch input:checked + .mrt-zone-slider:before {
        transform: translateX(22px); /* Standardized */
    }

    #mrt-zone-preset {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 0.85em;
        padding: 8px 12px;
    }
}

@media (max-width: 375px) {
    .mrt-zone-config-toggle {
        padding: 14px;
    }

    .mrt-zone-switch-header {
        gap: 5px;
    }

    .mrt-zone-header-left h4 {
        font-size: 1em;
    }

    .mrt-zone-header-left p {
        font-size: 0.9em;
    }

    .mrt-zone-switch {
        height: 26px; /* Standardized Mobile Portrait */
        width: 48px; /* Standardized Mobile Portrait */
    }

    .mrt-zone-slider::before,
    .mrt-zone-slider:before {
        height: 18px; /* Standardized */
        width: 18px; /* Standardized */
        left: 4px;
        bottom: 4px;
    }

    .mrt-zone-switch input:checked + .mrt-zone-slider::before,
    .mrt-zone-switch input:checked + .mrt-zone-slider:before {
        transform: translateX(20px); /* Standardized */
    }

    .mrt-mode-options {
        grid-template-columns: 1fr;
    }

    #mrt-zone-preset {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 0.8em;
        padding: 8px 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #mrt-zone-preset option {
        font-size: 0.9em;
    }
}

@media (max-width: 360px) {
    .mrt-zone-config-content {
        padding: 15px;
    }

    #mrt-zone-preset {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        font-size: 0.75em;
        padding: 8px 8px;
    }

    #mrt-zone-preset option {
        font-size: 1em;
        padding: 4px;
    }

    .mrt-preset-selector h6 {
        font-size: 0.9em;
    }
}
