/* ========================================= */
/* --- Global Styles --- */
/* ========================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ebecf0; 
    color: #202124;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden; 
    transition: background-color 0.3s, color 0.3s;
}

.app-layout {
    display: flex;
    height: 100vh;
}

/* ========================================= */
/* --- Sidebar --- */
/* ========================================= */
.sidebar {
    width: 200px;
    background-color: #ffffff; 
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-right: 1px solid #dadce0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    color: #5f6368;
}

.nav-item.active { 
    background-color: #e8f0fe; 
    color: #1a73e8; 
}

/* ========================================= */
/* --- Main Content Area --- */
/* ========================================= */
.main-content {
    flex: 1;
    background-color: #ebecf0; 
    padding: 30px;
    overflow-y: auto;
    transition: background-color 0.3s;
}

.main-header {
    background-color: #ffffff;
    padding: 15px 20px;
    border-radius: 4px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid #dadce0;
}

.header-text h1 { 
    font-size: 20px; 
    margin: 0; 
    color: #202124; 
}

#header-actions { 
    display: flex; 
    gap: 8px; 
}

.header-action-btn {
    border-radius: 4px; 
    background-color: #f8f9fa;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-action-btn:hover { 
    background-color: #e8eaed; 
}

.icon-btn { 
    padding: 8px; 
}

/* ========================================= */
/* --- FAKE TELEMETRY CHART --- */
/* ========================================= */
.telemetry-panel {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.telemetry-title {
    font-size: 11px;
    font-weight: 800;
    color: #5f6368;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.css-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    margin-bottom: 10px;
    border-bottom: 1px solid #dadce0;
    padding-bottom: 5px;
}

.css-bar {
    flex: 1;
    background: #1a73e8;
    opacity: 0.8;
    animation: bar-pulse 1s infinite alternate ease-in-out;
}

.bar-1 { animation-delay: 0.1s; height: 40%; } 
.bar-2 { animation-delay: 0.5s; height: 80%; }
.bar-3 { animation-delay: 0.2s; height: 20%; } 
.bar-4 { animation-delay: 0.7s; height: 60%; }
.bar-5 { animation-delay: 0.3s; height: 90%; } 
.bar-6 { animation-delay: 0.1s; height: 30%; }
.bar-7 { animation-delay: 0.8s; height: 50%; } 
.bar-8 { animation-delay: 0.4s; height: 70%; }
.bar-9 { animation-delay: 0.2s; height: 10%; } 
.bar-10 { animation-delay: 0.6s; height: 100%; }
.bar-11 { animation-delay: 0.5s; height: 40%; } 
.bar-12 { animation-delay: 0.9s; height: 80%; }
.bar-13 { animation-delay: 0.3s; height: 20%; } 
.bar-14 { animation-delay: 0.1s; height: 60%; }
.bar-15 { animation-delay: 0.7s; height: 90%; } 
.bar-16 { animation-delay: 0.4s; height: 30%; }
.bar-17 { animation-delay: 0.2s; height: 50%; } 
.bar-18 { animation-delay: 0.8s; height: 70%; }
.bar-19 { animation-delay: 0.6s; height: 10%; } 
.bar-20 { animation-delay: 0.3s; height: 100%; }

@keyframes bar-pulse { 
    0% { transform: scaleY(0.2); transform-origin: bottom; } 
    100% { transform: scaleY(1); transform-origin: bottom; } 
}

.telemetry-stats {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 11px;
    font-weight: bold;
    color: #5f6368;
}

/* ========================================= */
/* --- Quick Macros --- */
/* ========================================= */
.quick-macros { 
    margin-bottom: 20px; 
    border: 1px solid #dadce0; 
    padding: 15px; 
    border-radius: 4px; 
    background: #ffffff; 
}

.quick-macros h2 { 
    font-size: 12px; 
    color: #5f6368; 
    margin-top: 0; 
    margin-bottom: 10px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

.macro-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.macro-btn {
    background-color: #f8f9fa;
    border: 1px solid #bdc1c6;
    color: #202124;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.macro-btn .material-icons { 
    font-size: 16px; 
}

.macro-btn:hover { 
    background-color: #e8eaed; 
}

/* ========================================= */
/* --- Filters --- */
/* ========================================= */
.filters {
    display: flex;
    gap: 0; 
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 4px; 
    border: 1px solid #dadce0;
    overflow: hidden;
}

.pill {
    flex: 1; 
    background-color: #ffffff;
    border: none;
    border-right: 1px solid #dadce0;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    color: #5f6368;
    cursor: pointer;
}

.pill:last-child { 
    border-right: none; 
}

.pill.active { 
    background-color: #1a73e8; 
    color: #ffffff; 
}

/* ========================================= */
/* --- Device Cards Grid (2-COLUMN FIX) --- */
/* ========================================= */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.device-card {
    background: #ffffff;
    border-radius: 4px; 
    border: 1px solid #bdc1c6; 
    box-shadow: none;
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.device-info h3 { 
    margin: 0; 
    font-size: 16px; 
    font-weight: 800; 
    color: #202124; 
}

.status { 
    font-size: 12px; 
    color: #e65100; 
    font-weight: 700; 
    display: inline-block; 
    padding: 2px 6px; 
    background: rgba(230, 81, 0, 0.1); 
    border-radius: 4px;
}

#light-status { 
    color: #5f6368; 
    background: #e8eaed; 
} 

.fav-btn { 
    cursor: pointer; 
    color: #1a73e8; 
    display: flex;
}

/* This creates the two dense columns INSIDE each card */
.card-body-complex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px;
}

.complex-col-left, .complex-col-right {
    display: flex;
    flex-direction: column;
}

/* ========================================= */
/* --- FORM STYLING --- */
/* ========================================= */
.form-group {
    margin-bottom: 20px;
}

.form-group > label {
    font-size: 11px;
    font-weight: 700;
    color: #5f6368;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================= */
/* --- PRO CONTROLS --- */
/* ========================================= */
.pro-btn {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #1a73e8;
    color: #1a73e8;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.pro-btn:hover { 
    background-color: #e8f0fe; 
}

.slider-group { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

/* BUG FIX: Slider Dot Alignment! */
input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px; /* Thickened to hold dot securely */
    background: #dadce0; 
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    margin: 10px 0; /* Gives thumb space so it doesn't clip */
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; 
    height: 18px;
    border-radius: 50%;
    background: #1a73e8;
    cursor: pointer;
    border: 2px solid #ffffff; /* Adds a nice white border to make it look premium */
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.text-input {
    background: white; 
    color: #202124; 
    border: 1px solid #dadce0; 
    border-radius: 4px;
}

.num-box {
    width: 50px;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #9aa0a6;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #202124;
}

.dropdown-select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #9aa0a6;
    font-size: 13px;
    background: white;
    width: 100%;
}

.dense-readout {
    background: transparent;
    border: 1px solid #dadce0;
    padding: 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #3c4043;
}

.dense-readout p { 
    margin: 5px 0; 
}

.fake-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #3c4043;
    margin-bottom: 8px;
    font-weight: 500 !important;
    text-transform: none !important;
}

/* ========================================= */
/* --- ADMIN BUTTONS --- */
/* ========================================= */
.admin-buttons { 
    display: flex; 
    gap: 8px; 
}

.secondary-btn { 
    background: #f1f3f4; 
    border: 1px solid #dadce0; 
    padding: 10px; 
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: 600; 
    cursor: pointer; 
    color: #3c4043; 
    flex: 1;
}

.secondary-btn:hover { 
    background: #e8eaed; 
}

.danger-btn { 
    background-color: #ffffff; 
    color: #d93025; 
    border: 1px solid #fad2cf; 
    padding: 10px; 
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: 600; 
    cursor: pointer; 
    flex: 1;
}

.danger-btn:hover { 
    background: #fce8e6; 
}

/* ========================================= */
/* --- TV Remote styling --- */
/* ========================================= */
.tv-remote { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 5px; 
    background: transparent; 
    border: 1px solid #dadce0; 
    padding: 15px; 
    border-radius: 4px; 
}

.remote-row { 
    display: flex; 
    gap: 5px; 
}

.remote-btn { 
    background: #ffffff; 
    border: 1px solid #bdc1c6; 
    border-radius: 4px; 
    width: 45px; 
    height: 40px; 
    font-size: 11px; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    color: #5f6368; 
}

.remote-btn:hover { 
    background: #e8eaed; 
    color: #1a73e8; 
}


/* --- iPad tap/zoom guard for participant testing --- */
.header-action-btn,
.macro-btn,
.pill,
.pro-btn,
.secondary-btn,
.danger-btn,
.remote-btn,
.connect-btn,
input[type="range"],
select,
input[type="number"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tv-remote,
.remote-row {
    touch-action: manipulation;
}

/* ========================================= */
/* --- Edit Mode Drag & Drop --- */
/* ========================================= */

.device-grid.edit-mode .device-card,
.filters.edit-mode .pill,
.macro-container.edit-mode .macro-btn { 
    cursor: grab !important; 
    border: 2px dashed #1a73e8 !important; 
    user-select: none !important; 
    -webkit-user-drag: element !important;
}

.device-grid.edit-mode .device-card *,
.filters.edit-mode .pill *,
.macro-container.edit-mode .macro-btn * { 
    pointer-events: none !important; 
}

.device-grid.edit-mode .device-card.dragging,
.filters.edit-mode .pill.dragging,
.macro-container.edit-mode .macro-btn.dragging { 
    opacity: 0.4 !important; 
    transform: scale(0.98) !important; 
}


/* --- Touch-friendly layout editing on iPad / tablets --- */
.device-grid.edit-mode .device-card,
.filters.edit-mode .pill,
.macro-container.edit-mode .macro-btn {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    touch-action: none !important;
}

/* --- Animated touch drag feedback for iPad / tablets --- */
.drag-placeholder {
    border: 2px dashed #8ab4f8;
    background: rgba(138, 180, 248, 0.12);
    animation: dragPlaceholderPulse 0.95s ease-in-out infinite alternate;
}

.device-card-placeholder {
    min-height: 120px;
}

.pill-placeholder,
.macro-btn-placeholder {
    display: inline-flex;
}

.touch-dragging {
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18) !important;
    opacity: 0.98 !important;
    cursor: grabbing !important;
}

@keyframes dragPlaceholderPulse {
    from {
        background: rgba(138, 180, 248, 0.10);
        transform: scale(0.985);
    }
    to {
        background: rgba(138, 180, 248, 0.18);
        transform: scale(1);
    }
}


/* ========================================= */
/* --- Offline Styles --- */
/* ========================================= */
.device-card.offline { 
    border-color: #dadce0 !important; 
    opacity: 0.7; 
}

.device-card.offline .status { 
    color: #d93025 !important; 
    background: rgba(217, 48, 37, 0.1); 
}

.device-card.offline .complex-col-left { 
    opacity: 0.4; 
    pointer-events: none; 
}

/* ========================================= */
/* --- Energy Stat Cards --- */
/* ========================================= */
.stat-card { 
    background: #ffffff; 
    border: 1px solid #dadce0; 
    border-radius: 4px; 
    padding: 20px; 
    box-shadow: none; 
}

.stat-card h3 { 
    font-size: 11px; 
    color: #5f6368; 
    margin-top: 0; 
    text-transform: uppercase; 
    font-weight: bold;
}

.big-number { 
    font-size: 28px; 
    font-weight: 800; 
    color: #1a73e8; 
    margin: 10px 0; 
}

.unit { 
    font-size: 16px; 
    color: #5f6368; 
    font-weight: normal; 
}

.sub-text { 
    font-size: 12px; 
    color: #34a853; 
    margin: 0; 
}

/* ========================================= */
/* --- Activity Log --- */
/* ========================================= */
.log-section ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    background: #ffffff; 
    border: 1px solid #dadce0; 
    border-radius: 4px; 
    padding: 20px; 
    max-height: 500px; 
    overflow-y: auto; 
}

.log-section li { 
    padding: 10px 0; 
    border-bottom: 1px solid #e8eaed; 
    font-size: 13px; 
    color: #3c4043; 
    font-family: monospace; 
}

.log-section li:last-child { 
    border-bottom: none; 
}

/* ========================================= */
/* --- Modal Styles --- */
/* ========================================= */
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 1000; 
}

.modal-content { 
    background: white; 
    padding: 30px; 
    border-radius: 8px; 
    width: 500px; 
    max-width: 90%; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
}

.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    border-bottom: 1px solid #dadce0; 
    padding-bottom: 15px;
}

.modal-header h2 { 
    margin: 0; 
    font-size: 18px; 
    color:#202124;
}

.close-modal { 
    cursor: pointer; 
    color: #5f6368; 
}

/* ========================================= */
/* --- Pairing List --- */
/* ========================================= */
.device-list { 
    list-style: none; 
    padding: 0; 
    margin: 20px 0 0; 
    text-align: left; 
}

.device-list-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    gap: 15px; 
    padding: 15px 20px; 
    border: 1px solid #dadce0; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    background: #ffffff;
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.connect-btn:hover {
    background-color: #f8f9fa !important;
}

.spinner { 
    border: 4px solid #f1f3f4; 
    border-top: 4px solid #1a73e8; 
    border-radius: 50%; 
    width: 40px; 
    height: 40px; 
    animation: spin 1s linear infinite; 
    margin: 0 auto 15px; 
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

.auto-action-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 10px; 
    background: #f8f9fa; 
    border-radius: 4px; 
    border: 1px solid #dadce0; 
    margin-bottom: 8px; 
    font-size: 13px;
}

/* ========================================= */
/* --- Mic Pulse --- */
/* ========================================= */
.mic-pulse-container { 
    width: 80px; 
    height: 80px; 
    background: #e8f0fe; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto; 
    transition: all 0.3s; 
}

.mic-pulse-container.listening { 
    background: #fce8e6; 
    animation: pulse 1.5s infinite; 
}

.mic-pulse-container.listening .material-icons { 
    color: #d93025 !important; 
}

@keyframes pulse { 
    0% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.4); } 
    70% { box-shadow: 0 0 0 20px rgba(217, 48, 37, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0); } 
}

/* ==================================================== */
/* THE ULTIMATE PRO DARK MODE (FLATTENED)               */
/* ==================================================== */
body.dark-mode { 
    background-color: #121212 !important; 
    color: #e8eaed; 
}

body.dark-mode .sidebar { 
    background-color: #1e1e1e; 
    border-right-color: #333333;
}

body.dark-mode .main-content { 
    background-color: #121212 !important; 
    border-left-color: #333333; 
}

body.dark-mode .main-header { 
    background-color: #1e1e1e; 
    border-color: #333333; 
    box-shadow: none; 
}

body.dark-mode .header-text h1 { 
    color: #e8eaed; 
}

body.dark-mode .header-action-btn { 
    background-color: #282828; 
    color: #e8eaed; 
    border-color: #444444; 
}

body.dark-mode .header-action-btn:hover { 
    background-color: #333333; 
}

body.dark-mode .icon-btn { 
    background-color: #282828; 
    color: #e8eaed; 
}

body.dark-mode .icon-btn:hover { 
    background-color: #333333; 
}

body.dark-mode .telemetry-panel { 
    background: #1e1e1e; 
    border-color: #333333; 
}

body.dark-mode .css-chart { 
    border-bottom-color: #333333; 
}

body.dark-mode .quick-macros { 
    background: #1e1e1e; 
    border-color: #333333; 
}

body.dark-mode .quick-macros h2 { 
    color: #9aa0a6; 
}

body.dark-mode .macro-btn { 
    background-color: #282828; 
    border-color: #444444; 
    color: #e8eaed; 
}

body.dark-mode .macro-btn:hover { 
    background-color: #333333; 
}

body.dark-mode .filters { 
    background-color: #1e1e1e; 
    border-color: #333333; 
}

body.dark-mode .pill { 
    background-color: #1e1e1e; 
    color: #e8eaed; 
    border-color: #333333; 
}

body.dark-mode .pill.active { 
    background-color: #8ab4f8; 
    color: #121212; 
    border-color: #8ab4f8; 
}

body.dark-mode .nav-item { 
    color: #9aa0a6; 
}

body.dark-mode .nav-item:hover, 
body.dark-mode .nav-item.active { 
    background-color: #282828; 
    color: #8ab4f8; 
}

/* CARDS FLATTENED */
body.dark-mode .device-card { 
    background: #1e1e1e; 
    border-color: #333333; 
}

body.dark-mode .card-header { 
    background: transparent; 
    border-bottom-color: #333333; 
}

body.dark-mode .device-info h3 { 
    color: #e8eaed; 
}

body.dark-mode .form-group > label { 
    color: #9aa0a6; 
}

body.dark-mode .dense-readout { 
    background: transparent; 
    border-color: #444444; 
    color: #e8eaed; 
}

body.dark-mode .fake-checkbox { 
    color: #e8eaed; 
}

body.dark-mode .pro-btn { 
    background: transparent; 
    color: #8ab4f8; 
    border-color: #5f6368; 
}

body.dark-mode .pro-btn:hover { 
    background: #282828; 
}

body.dark-mode .secondary-btn, 
body.dark-mode .dropdown-select, 
body.dark-mode .text-input, 
body.dark-mode .num-box { 
    background: transparent; 
    color: #e8eaed; 
    border-color: #444444; 
}

body.dark-mode .secondary-btn:hover { 
    background: #282828; 
}

body.dark-mode .danger-btn { 
    background: transparent; 
    color: #f28b82; 
    border-color: #662222; 
}

body.dark-mode .danger-btn:hover { 
    background: #3d1a1a; 
}

body.dark-mode .tv-remote { 
    background: transparent; 
    border-color: #444444;
}

body.dark-mode .remote-btn { 
    background: #282828; 
    border-color: #444444; 
    color: #e8eaed; 
}

body.dark-mode .remote-btn:hover { 
    background: #333333; 
    color: #8ab4f8; 
}

body.dark-mode .modal-content { 
    background: #1e1e1e; 
    border-color: #333333; 
    color: #e8eaed; 
    border: 1px solid #444;
}

body.dark-mode .modal-header { 
    border-bottom-color: #333333; 
}

body.dark-mode .modal-header h2 { 
    color: #e8eaed; 
}

body.dark-mode .device-list-item { 
    background: transparent; 
    border-color: #444444; 
}

body.dark-mode .connect-btn {
    border-color: #5f6368 !important;
    color: #8ab4f8 !important;
}

body.dark-mode .list-item-text strong { 
    color: #e8eaed; 
}

body.dark-mode .auto-action-item { 
    background: transparent; 
    border-color: #444444; 
}

body.dark-mode .log-section ul { 
    background: #1e1e1e; 
    border-color: #333333; 
}

body.dark-mode .log-section li { 
    border-color: #333333; 
    color: #e8eaed; 
}

body.dark-mode .mic-pulse-container { 
    background: #1a2a40; 
}

body.dark-mode .mic-pulse-container.listening { 
    background: #401a1a; 
}

body.dark-mode .stat-card { 
    background: #1e1e1e; 
    border-color: #333333; 
}

/* FIX DARK MODE EDIT LAYOUT BLOCKS FORCING THE OVERRIDE */
body.dark-mode .device-grid.edit-mode .device-card,
body.dark-mode .filters.edit-mode .pill,
body.dark-mode .macro-container.edit-mode .macro-btn { 
    border-color: #8ab4f8 !important; 
}

/* Active States */
body.dark-mode .device-card.active-light:not(.offline) { 
    border-color: #fde293; 
}

body.dark-mode .device-card.active-heat:not(.offline) { 
    border-color: #fad2cf; 
}

body.dark-mode .device-card.active-media:not(.offline) { 
    border-color: #8ab4f8; 
}

/* ========================================= */
/* --- Automation Modal Enhancements --- */
/* ========================================= */
.automation-form {
    display: flex;
    flex-direction: column;
}

.auto-actions-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.modal-state {
    text-align: center;
    padding: 20px 0;
}

.routine-custom {
    border-left: 4px solid #34a853;
}

.routine-custom .card-header {
    background: #edf7ee;
}

body.dark-mode .routine-custom {
    border-left-color: #81c995;
}

body.dark-mode .routine-custom .card-header {
    background: #203124;
}


body.dark-mode .drag-placeholder {
    border-color: #8ab4f8;
    background: rgba(138, 180, 248, 0.16);
}

body.dark-mode .touch-dragging {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55) !important;
}

.drag-proxy {
    will-change: left, top, transform;
}

.drag-source-hidden {
    visibility: hidden !important;
}

.main-content.drag-scroll-lock {
    overflow: hidden !important;
}
