html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    scroll-behavior: smooth;
    background-color: #eab308; /* Tailwind eab308 f97316 f7f2ef orange-500 */
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

a {
    transition: color 0.3s ease;
}

.banner-container {
    text-align: center; /* centers everything inside */
    margin: 20px auto; /* vertical spacing and auto horizontal centering */
    max-width: 600px; /* define your banner width */
}

.banner {
    width: 100%; /* banner takes full width of container */
    height: auto; /* maintains aspect ratio */
    display: block; /* remove inline spacing */
    margin: 0 auto; /* ensure it's centered */
}

.candidate-text {
    margin-top: 15px; /* space between banner and text */
    font-size: 18px; /* adjust size as needed */
    font-weight: bold;
    color: #000; /* or any color you want */
}

.custom-btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #97ccff; /* Blue background for enabled, change if you want a universal bg */
    border-radius: 4px;
    padding: 18px 22px;
    width: max-content;
}

    .custom-btn-wrapper.disabled-bg {
        background: #979fa7; /* Gray background for visually disabled rows */
    }

.arrow-icon {
    margin-right: 18px;
    display: flex;
    align-items: center;
}

.custom-capsule-btn {
    border: none;
    outline: none;
    border-radius: 30px;
    width: 64px;
    height: 36px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.15s;
    cursor: pointer;
    background: linear-gradient(180deg, #0846c7 80%, #1870ed 100%);
}

.custom-capsule-inner {
    background: #1870ed;
    border-radius: 18px;
    width: 42px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-icon svg {
    stroke: #0736b8;
}
/* Disabled states */
.custom-capsule-btn:disabled,
.custom-capsule-btn.disabled {
    background: linear-gradient(180deg, #666d79 80%, #949ba3 100%);
    cursor: not-allowed;
    pointer-events: none;
}

    .custom-capsule-btn:disabled .custom-capsule-inner,
    .custom-capsule-btn.disabled .custom-capsule-inner {
        background: #c4cad2;
    }

.custom-btn-wrapper.disabled-bg .arrow-icon svg,
.custom-btn-wrapper .custom-capsule-btn:disabled + .arrow-icon svg,
.custom-btn-wrapper .custom-capsule-btn.disabled + .arrow-icon svg {
    stroke: #fff;
}

.custom-capsule-btn:active,
.custom-capsule-btn:focus {
    background: #2979ff; /* Lighter blue when pressed */
    box-shadow: 0 2px 8px rgba(23,70,224,0.32) inset, 0 0 0 4px #1746e0;
    transform: scale(0.94);
}

    .custom-capsule-btn:active .custom-capsule-inner,
    .custom-capsule-btn:focus .custom-capsule-inner {
        background: #63a4ff; /* Even lighter blue for pressed inner */
        box-shadow: 0 1px 6px rgba(23,70,224,0.18) inset;
    }


.custom-capsule-btn:disabled:active,
.custom-capsule-btn.disabled:active,
.custom-capsule-btn:disabled:focus,
.custom-capsule-btn.disabled:focus {
    filter: none;
}

.main-wrapper {
    max-width: 1200px; /* Or your preferred width */
    margin: 0 auto; /* Center horizontally */
    background: #fff; /* Optional: keeps content crisp on colored bg */
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    border-radius: 18px;
    padding: 0 32px; /* Inner spacing, adjust as needed */
}

.grid-pressed {
    transform: scale(0.96);
    transition: transform 0.22s cubic-bezier(.4,2,.3,1);
}

.candidate-row-flex {
    display: flex;
    align-items: center;
    width: 100%;
}

.candidate-name-flex {
    flex: 0 0 80%;
    max-width: 80%;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.party-symbol-img {
    flex: 0 0 20%;
    max-width: 20%;
    height: 48px;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}


@media (max-width: 600px) {
    /* Container adjustments */
    .max-w-2xl {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .bg-yellow-400 {
        border-radius: 0 !important;
    }

    #evm-box-sim {
        padding: 0.5rem !important;
    }

        /* Grid row: always 3 columns, compact gaps */
        #evm-box-sim .grid {
            grid-template-columns: 2fr 1fr 1fr !important; /* Candidate+symbol, button */
            gap: 0.15rem !important;
            align-items: center !important;
            padding-bottom: 0.5rem !important;
        }

            #evm-box-sim .grid > div {
                max-width: 100%;
                overflow: hidden;
                min-width: 0;
            }

    /* Candidate name + party symbol flex row */
    .candidate-row-flex {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .candidate-name-flex {
        flex: 0 0 80%;
        max-width: 80%;
        font-size: 0.95rem !important;
        margin: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .party-symbol-img {
        flex: 0 0 20%;
        max-width: 20%;
        height: 32px !important;
        object-fit: contain !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
    }
    /* SVG inside disabled symbol */
    #candidate-name-with-party-logo-disabled .party-symbol-img svg {
        height: 20px !important;
        width: 20px !important;
        margin-right: 4px !important;
    }
    /* IMG inside enabled symbol */
    #candidate-name-with-party-logo .party-symbol-img img {
        height: 30px !important;
        width: 30px !important;
        margin-right: 4px !important;
    }

    /* Button wrapper and button */
    .custom-btn-wrapper,
    #vote-with-arrow,
    #vote-with-arrow-disabled {
        max-width: 100% !important;
        overflow: hidden !important;
        min-width: 0 !important;
        padding: 4px 6px !important;
        gap: 0.10rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    .arrow-icon svg {
        height: 18px !important;
        width: 18px !important;
        margin-right: 4px !important;
    }

    .custom-capsule-btn {
        width: 32px !important;
        height: 18px !important;
        border-radius: 9px !important;
        font-size: 0.9rem !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .custom-capsule-inner {
        width: 20px !important;
        height: 10px !important;
        border-radius: 5px !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Text adjustments */
    #evm-box-sim p,
    .candidate-name-flex {
        font-size: 0.95rem !important;
        margin-bottom: 0.10rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Miscellaneous */
    .grid-pressed {
        transform: scale(0.96);
        transition: transform 0.22s cubic-bezier(.4,2,.3,1);
    }
}
