/* BlueDrop Dashboard Custom Styles */

/* Blue water theme colors */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #bbdefb;
    --accent-color: #03a9f4;
    --text-primary: #212121;
    --text-secondary: #757575;
    --bg-light: #f5f7fa;
}

/* Body styles */
body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar styling */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.navbar-brand {
    font-weight: 700;
}

/* Card styling */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Button styling */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
}

.btn-back:hover, .btn-back:focus {
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.5);
    transform: translateY(-1px);
}

.btn-back:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}

/* Button Widget Styles */
.thingspeak-button {
    min-width: 150px;
    min-height: 60px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 12px 24px;
}

.thingspeak-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.thingspeak-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thingspeak-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Multi Button Widget Styles */
.multi-button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.multi-button-item {
    flex: 1 1 calc(50% - 1rem);
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.thingspeak-multi-button {
    min-width: 130px;
    min-height: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 10px 20px;
    width: 100%;
}

.thingspeak-multi-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.thingspeak-multi-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thingspeak-multi-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Button Widget with Indicator Styles */
.button-with-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

/* Button LED indicator styling */
.button-led-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ccc;
    display: inline-block;
    transition: background-color 0.3s, box-shadow 0.3s;
    margin-bottom: 10px;
}

/* Active state for button LED indicators */
.button-led-indicator.active {
    background-color: #00c853;
    box-shadow: 0 0 10px #00c853;
}

/* Make sure button container positions correctly */
.button-with-indicator {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.button-led-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto;
    background-color: #ccc;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Footer styling */
.footer {
    margin-top: auto;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

/* Form controls */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(26, 115, 232, 0.25);
}

/* Dashboard panel styling */
.dashboard-card {
    transition: all 0.3s ease;
}

.dashboard-card .current-value {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Table styling */
.table {
    vertical-align: middle;
}

.table tr {
    transition: background-color 0.2s;
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Channel fields modal refinement */
#channelFieldsModal .modal-content.channel-fields-shell {
    border: 0;
    border-radius: 0.9rem;
    overflow: hidden;
    box-shadow: 0 1rem 2.5rem rgba(12, 42, 74, 0.22);
}

#channelFieldsModal .channel-fields-header {
    border: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(120deg, #f7fbff 0%, #ecf5ff 100%);
}

#channelFieldsModal .channel-fields-header .modal-title {
    font-weight: 700;
    letter-spacing: 0.01em;
}

#channelFieldsModal .channel-fields-body {
    padding: 1.1rem 1.25rem;
    background: #f8fbff;
}

#channelFieldsModal .channel-summary {
    margin-bottom: 0.85rem;
}

#channelFieldsModal .channel-summary-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #17324d;
}

#channelFieldsModal .channel-fields-section-card {
    border: 1px solid #d8e8f8 !important;
    border-radius: 0.7rem;
    box-shadow: 0 0.3rem 0.8rem rgba(21, 62, 102, 0.08);
}

#channelFieldsModal .channel-fields-section-card .card-body {
    padding: 0.95rem;
}

#channelFieldsModal .input-group .form-control[readonly] {
    background-color: #f4f8fd;
    border-color: #d0deed;
    color: #20466b;
    font-size: 0.82rem;
}

#channelFieldsModal .copy-dynamic {
    border-color: #c9dbef;
}

#channelFieldsModal .copy-dynamic:hover {
    background-color: #eaf3fc;
}

#channelFieldsModal .channel-fields-table-wrap {
    border: 1px solid #d8e8f8;
    border-radius: 0.65rem;
    background: #ffffff;
    padding: 0.25rem 0.35rem;
}

#channelFieldsModal #channelFieldsTable thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #4f6f90;
    border-bottom-width: 1px;
}

#channelFieldsModal #channelFieldsTable tbody tr:hover {
    background-color: #f2f8ff;
}

#channelFieldsModal .channel-fields-danger-zone {
    border-color: #f2c6ce !important;
    background: linear-gradient(180deg, #fff9fa 0%, #ffffff 100%);
}

#channelFieldsModal .channel-fields-footer {
    border-top: 1px solid #d9e6f5;
    background: #f7fbff;
    padding: 0.9rem 1.25rem;
}

@media (max-width: 767.98px) {
    #channelFieldsModal .channel-fields-body {
        padding: 0.9rem;
    }

    #channelFieldsModal .channel-fields-header,
    #channelFieldsModal .channel-fields-footer {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }
}

/* Manage pages: background thumbnail */
.page-bg-thumb-wrap {
    width: 64px;
    height: 40px;
    border-radius: 0.4rem;
    overflow: hidden;
    border: 1px solid #d3e1f0;
    box-shadow: 0 2px 8px rgba(16, 54, 92, 0.12);
    background: #eef5fc;
}

.page-bg-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-image-card {
    border: 1px solid #d8e6f4;
}

.gallery-image-preview {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-bottom: 1px solid #e5eef8;
}

/* Page selection cards on /dashboard */
.page-select-card.has-page-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(245, 250, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 22px rgba(9, 33, 58, 0.14);
}

/* Main content container */
.main-container {
    min-height: calc(100vh - 160px);
    flex-shrink: 0;
}

/* Loading animation */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.loading-spinner {
    animation: pulse 1.5s infinite ease-in-out;
    width: 50px;
    height: 50px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
}

/* Widget Card Styles */
.widget-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: auto;  /* Changed from 100% to auto */
    padding: 0;    /* Changed from 1rem to 0 */
    width: 100%;
    border-radius: 0.5rem;
    background-color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

/* Glassy widget look over page background image */
.page-with-background .widget-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    box-shadow: 0 10px 24px rgba(7, 25, 45, 0.14) !important;
    backdrop-filter: blur(6px) saturate(118%);
    -webkit-backdrop-filter: blur(6px) saturate(118%);
}

.page-with-background .widget-card .card-header {
    background: linear-gradient(135deg, rgba(19, 86, 174, 0.68), rgba(8, 52, 120, 0.68)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.page-with-background .widget-card .card-body {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #142c44 !important;
}

.page-with-background .widget-card[data-widget-type="chart"] .card-body,
.page-with-background .widget-card[data-widget-type="bar_graph"] .card-body {
    background: rgba(255, 255, 255, 0.42) !important;
}

.page-with-background .widget-card[data-widget-type="chart"] .chart-container,
.page-with-background .widget-card[data-widget-type="bar_graph"] .chart-container {
    background: rgba(255, 255, 255, 0.42) !important;
    border: 1px solid rgba(16, 56, 94, 0.2);
    border-radius: 0.6rem;
    padding: 0.35rem;
}

.page-with-background .widget-card .widget-update-time,
.page-with-background .widget-card .text-muted {
    color: rgba(21, 43, 68, 0.9) !important;
}

.page-with-background .widget-card .widget-value,
.page-with-background .widget-card .widget-units,
.page-with-background .widget-card .widget-converted-value,
.page-with-background .widget-card .card-text,
.page-with-background .widget-card label,
.page-with-background .widget-card .small,
.page-with-background .widget-card .days-selector,
.page-with-background .widget-card .days-selector label,
.page-with-background .widget-card .h1,
.page-with-background .widget-card .h2,
.page-with-background .widget-card .h3,
.page-with-background .widget-card .h4,
.page-with-background .widget-card .h5,
.page-with-background .widget-card .h6 {
    color: #102941 !important;
}

.page-with-background .widget-card .led-legend,
.page-with-background .widget-card .led-legend span,
.page-with-background .widget-card .days-selector .form-select,
.page-with-background .widget-card .custom-range-selector .form-control,
.page-with-background .widget-card .custom-range-selector label {
    color: #163553 !important;
}

.page-with-background .widget-card .form-select,
.page-with-background .widget-card .form-control {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #15324f !important;
    border-color: rgba(18, 66, 122, 0.25) !important;
}

.widget-card .card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-height: 420px; /* Increased to fit LED widgets with units/conversion */
    overflow: hidden;
}

/* Chart and Bar Graph widgets need more height */
.col-lg-12 .widget-card .card-body {
    max-height: 350px; /* Larger for full-width chart widgets */
    min-height: 280px;
}

/* Chart Widget Styling - Adaptive Landscape */
.chart-container {
    position: relative;
    width: 100%;
    height: 280px; /* Fixed height for better chart rendering */
    margin: 0.5rem 0;
}

/* Full-width charts get more height */
.col-lg-12 .chart-container {
    height: 320px;
}

/* Slightly wider dashboard area for chart readability without going full-screen by default */
.main-container.dashboard-main-wide {
    max-width: 1380px !important;
}

.chart-expand-btn {
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--primary-dark);
}

.chart-expand-btn:hover,
.chart-expand-btn:focus {
    color: var(--primary-dark);
}

/* Expanded chart mode */
body.chart-widget-expanded-active {
    overflow: hidden;
}

body.chart-widget-expanded-active::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 45, 0.35);
    z-index: 1055;
}

.widget-card.is-expanded {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 0;
    right: 0;
    width: min(1240px, 90vw) !important;
    height: min(760px, calc(100dvh - 24px)) !important;
    margin-inline: auto;
    z-index: 1060;
    box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.25);
}

.widget-card.is-animating {
    transition: none !important;
}

.widget-card.is-expanded .card-body {
    min-height: 0 !important;
    height: calc(100% - 58px);
    max-height: none !important;
}

.widget-card.is-expanded .chart-container {
    height: 100% !important;
    min-height: 0 !important;
}

@media (max-width: 767.98px) {
    .main-container.dashboard-main-wide {
        max-width: 100% !important;
    }

    .chart-expand-btn {
        display: none !important;
    }

    .widget-card.is-expanded {
        top: 10px;
        left: 10px;
        right: 10px;
        width: calc(100vw - 20px) !important;
        height: calc(100dvh - 20px) !important;
        margin-inline: 0;
    }

    .widget-card.is-expanded .chart-container {
        height: clamp(260px, 62dvh, 72dvh) !important;
        min-height: 260px !important;
    }
}

/* Mobile landscape: ensure expanded card always fits visible viewport (no bottom cut) */
@media (orientation: landscape) and (max-height: 560px) {
    .widget-card.is-expanded {
        top: max(8px, env(safe-area-inset-top));
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 8px;
        right: 8px;
        width: auto !important;
        height: auto !important;
        margin-inline: 0;
    }

    .widget-card.is-expanded .card-body {
        height: calc(100% - 52px);
        overflow: hidden;
    }

    .widget-card.is-expanded .chart-container {
        height: 100% !important;
        min-height: 0 !important;
    }
}

/* Center Days selector for chart widgets */
.widget-card[data-widget-type="chart"] .days-selector,
.widget-card[data-widget-type="bar_graph"] .days-selector {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.widget-card[data-widget-type="chart"] .days-selector label,
.widget-card[data-widget-type="bar_graph"] .days-selector label {
    margin-right: 0 !important;
    margin-bottom: 0;
}

/* Let chart/bar widgets use more of the card area without affecting other widget types */
.widget-card[data-widget-type="chart"] .card-body,
.widget-card[data-widget-type="bar_graph"] .card-body {
    align-items: stretch;
    justify-content: flex-start;
    min-height: 300px;
    max-height: none;
    padding: 1rem;
}

.widget-card[data-widget-type="chart"] .chart-container,
.widget-card[data-widget-type="bar_graph"] .chart-container {
    width: 100%;
    flex: 0 0 auto;
    min-height: 280px;
    height: 300px;
    margin: 0.4rem 0 0;
}

@media (max-width: 991.98px) {
    .widget-card[data-widget-type="chart"] .card-body,
    .widget-card[data-widget-type="bar_graph"] .card-body {
        min-height: 280px;
        padding: 0.9rem;
    }

    .widget-card[data-widget-type="chart"] .chart-container,
    .widget-card[data-widget-type="bar_graph"] .chart-container {
        min-height: 240px;
        height: 260px;
    }
}

.widget-chart {
    width: 100%;
    height: 100%;
    min-height: 200px;
    position: relative;
    margin: 0;
}

.widget-bar-graph {
    width: 100%;
    height: 100%;
    min-height: 200px;
    position: relative;
    margin: 0;
}

/* Remove any point-related styling */
.widget-chart circle.point {
    display: none !important;
}

/* Chart axis labels */
.widget-chart text {
    font-size: 0.85rem !important;
}

.widget-chart .x-axis text {
    transform: rotate(-45deg);
    text-anchor: end;
}

.widget-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #01305f;
}

/* Loading state enhancement */
.loading-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* LED Widget Styles */
.led-indicator {
    --indicator-color: #ccc;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto;
    background-color: #ccc;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 18px rgba(8, 26, 46, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.45),
        inset 0 0 14px rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    border: 4px solid transparent;
}

.led-indicator.on {
    box-shadow:
        0 10px 24px rgba(8, 26, 46, 0.35),
        0 0 0 2px rgba(255, 255, 255, 0.55),
    0 0 18px var(--indicator-color),
    0 0 34px var(--indicator-color),
        inset 0 0 14px rgba(255, 255, 255, 0.25);
}

.led-indicator.indicator-valve {
    border-radius: 50%;
    background: transparent !important;
    border-color: var(--indicator-color);
}

.led-indicator.indicator-valve::before,
.led-indicator.indicator-valve::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    background: var(--indicator-color);
    transform-origin: center;
}

.led-indicator.indicator-valve::before {
    width: 68px;
    height: 68px;
    background:
        radial-gradient(circle, transparent 0 20px, var(--indicator-color) 20px 23px, transparent 23px),
        linear-gradient(var(--indicator-color), var(--indicator-color)) 50% 50% / 44px 7px no-repeat,
        linear-gradient(var(--indicator-color), var(--indicator-color)) 50% 50% / 7px 44px no-repeat;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: valve-rotate 1.8s linear infinite;
    animation-direction: normal;
}

.led-indicator.indicator-valve::after {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--indicator-color);
    transform: translate(-50%, -50%);
}

.led-indicator.indicator-pump {
    border-radius: 18px;
    background: transparent !important;
    border-color: var(--indicator-color);
}

.led-indicator.indicator-pump::before {
    content: '';
    position: absolute;
    inset: 17px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: var(--indicator-color);
    border-right-color: var(--indicator-color);
    animation: pump-spin 0.9s linear infinite;
}

.led-indicator.indicator-pump::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--indicator-color);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.led-indicator.indicator-valve.status-stopped::before,
.led-indicator.indicator-pump.status-stopped::before {
    animation-play-state: paused;
}

.led-indicator.indicator-valve.status-opening::before {
    animation-direction: reverse;
}

.led-indicator.indicator-valve.status-closing::before {
    animation-direction: normal;
}

@keyframes valve-motion {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.88);
        opacity: 0.78;
    }
}

@keyframes valve-rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pump-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Widget Grid Layout - Adaptive */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 0 1rem;
}

/* Widget List Layout */
.dashboard-list .col {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

.dashboard-list .widget-card {
    margin-bottom: 1rem;
}

.dashboard-list .widget-chart {
    max-height: 300px;
}

/* Widget Error State */
.widget-error {
    color: #e74c3c;
    text-align: center;
    padding: 2rem;
}

/* Numeric Widget Styles */
.widget-card .card-body {
    min-height: 200px;
}

.widget-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.widget-update-time {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Chart Widget specific styling */
.widget-chart {
    width: 100%; 
    height: 100%;
}

/* Multi-Button Configuration Table */
.multi-button-config-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.multi-button-config-table tr:not(:last-child) td {
    border-bottom: 1px solid #dee2e6;
}

.multi-button-config-table td {
    background: #fff;
    padding: 12px 8px;
}

.multi-button-config-table thead th {
    background-color: var(--primary-light);
    font-weight: 600;
    white-space: nowrap;
    padding: 12px 8px;
}

.multi-button-config-table td:first-child {
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
    width: 90px;
}

/* Column widths */
.multi-button-config-table td:nth-child(1) { width: 100px; }
.multi-button-config-table td:nth-child(2) { width: 240px; }
.multi-button-config-table td:nth-child(3) { width: 120px; }
.multi-button-config-table td:nth-child(4) { width: 240px; }
.multi-button-config-table td:nth-child(5) { width: 140px; }
.multi-button-config-table td:nth-child(6) { width: 160px; }

/* Table container */
.table-responsive {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
}

/* Input fields */
.multi-button-config-table input.form-control-sm {
    display: block;
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.multi-button-config-table input.form-control-sm:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.25);
}

/* Container styling */
#multi-buttons-container,
#edit-multi-buttons-container {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.multi-button-help {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

/* OAuth Divider Styling */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.divider:not(:empty)::before {
    margin-right: 0.75rem;
}

.divider:not(:empty)::after {
    margin-left: 0.75rem;
}

.divider-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Modern Google Sign-in Button */
.btn-google {
    background-color: #ffffff;
    border: 1px solid #dadce0;
    color: #3c4043;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #d2e3fc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    color: #3c4043;
}

.btn-google:focus {
    background-color: #f8f9fa;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
    color: #3c4043;
    outline: none;
}

.btn-google:active {
    background-color: #f1f3f4;
    border-color: #5195ee;
    color: #3c4043;
}
