/**
 * SmartAct - Detail Control View
 * Optimized for Build v36.0 (Elite Professional)
 */

.detail-view {
    position: fixed;
    inset: 0;
    z-index: 5000; /* Over everything */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-view:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.control-card {
    width: 100%;
    max-width: 380px;
    background: linear-gradient(165deg, rgba(20, 20, 25, 0.98), rgba(10, 10, 15, 1));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 35px;
    padding: 35px;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    transform: scale(0.9) translateY(30px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.detail-view:not(.hidden) .control-card {
    transform: scale(1) translateY(0);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.detail-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Actuator Visualization */
.actuator-visual {
    height: 180px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.actuator-bar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 20px;
    box-shadow: 0 0 30px var(--primary-glow);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Control Buttons Grid */
.main-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.ctrl-btn {
    padding: 18px;
    border-radius: 20px;
    border: none;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.ctrl-btn.open {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.ctrl-btn.stop {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.ctrl-btn.close {
    background: linear-gradient(135deg, #2c3e50, #000000);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ctrl-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

/* Partial Mode Toggle Area */
.toggle-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 25px;
    border-radius: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-info h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.toggle-info p {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin: 0;
}

/* Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}
