

.cc-tab-content > .tab-pane.fade {
    transition: none !important;
}

.inline-action-btns {
    position: absolute;
    top: 50px;
    right: 20px;
    z-index: 100;
    display: flex !important;
    gap: 8px;
    align-items: center;
}

.main-result {
    color: rgba(0, 0, 0, .85);
}

html[data-theme="dark"] .main-result,
body[data-theme="dark"] .main-result {
    color: rgba(255, 255, 255, .9);
}


#main-result {
    padding-right: 110px !important;
}

.scratch-card .card {
    overflow: visible;
}
.scratch-card .card-body {
    overflow-y: auto;
    overflow-x: hidden;
}
@media (max-width: 768px) {
    .inline-action-btns {
        right: 15px;
    }
    #main-result {
        padding-right: 100px !important;
    }
}
.inline-action-btns[style*="display: none"] {
    display: none !important;
}
.btn-icon-only {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.7);
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
}
.btn-icon-only:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
    color: rgba(0, 0, 0, 0.9);
}
.btn-icon-only:active {
    background-color: rgba(0, 0, 0, 0.15);
}
.btn-icon-only:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-icon-only .icon-svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

html[data-theme="dark"] .btn-icon-only,
body[data-theme="dark"] .btn-icon-only {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}
html[data-theme="dark"] .btn-icon-only:hover,
body[data-theme="dark"] .btn-icon-only:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}
html[data-theme="dark"] .btn-icon-only:active,
body[data-theme="dark"] .btn-icon-only:active {
    background-color: rgba(255, 255, 255, 0.25);
}

#card-details-card.has-results #main-result {
    background-color: rgba(40, 167, 69, 0.05) !important;
}
html[data-theme="dark"] #card-details-card.has-results #main-result,
body[data-theme="dark"] #card-details-card.has-results #main-result {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.scratch-card .card-footer {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.scratch-card .card-footer .btn.m-1 {
    margin: 0 !important;
}

.scratch-card .card-footer .form-group.mb-0 {
    margin-bottom: 0 !important;
}


.cc-tabbar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
    justify-items: stretch;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: transparent;
    flex-wrap: unset;
}
.cc-tabbar .nav-item {
    min-width: 0;
    margin: 0;
    padding: 0;
    flex: unset;
    width: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.cc-tabbar .cc-tab {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.8125rem 0.65rem;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 10px;
    border-width: 1px;
    border-style: solid;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}


html:not([data-theme="dark"]) .cc-tabbar .cc-tab,
html[data-theme="light"] .cc-tabbar .cc-tab {
    color: #3f3f3f !important;
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%) !important;
    border-width: 2px;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transform: none;
}
html:not([data-theme="dark"]) .cc-tabbar .cc-tab:hover,
html[data-theme="light"] .cc-tabbar .cc-tab:hover {
    color: #1a1a1a !important;
    background: linear-gradient(180deg, #f4f4f4 0%, #eaeaea 100%) !important;
    border-color: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html:not([data-theme="dark"]) .cc-tabbar .cc-tab.active,
html[data-theme="light"] .cc-tabbar .cc-tab.active {
    color: #0f172a !important;
    font-weight: 700;
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%) !important;
    border-width: 2px;
    border-color: #067f42;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transform: none;
}
html:not([data-theme="dark"]) .cc-tabbar .cc-tab.active:hover,
html[data-theme="light"] .cc-tabbar .cc-tab.active:hover {
    color: #0a0f1a !important;
    background: linear-gradient(180deg, #f4f4f4 0%, #eaeaea 100%) !important;
    border-width: 2px;
    border-color: #056338;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}


html[data-theme="dark"] .cc-tabbar .cc-tab,
body[data-theme="dark"] .cc-tabbar .cc-tab {
    color: rgba(248, 250, 252, 0.78);
    background: linear-gradient(180deg, #35363b 0%, #2a2b2f 100%);
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    transform: none;
}
html[data-theme="dark"] .cc-tabbar .cc-tab:hover,
body[data-theme="dark"] .cc-tabbar .cc-tab:hover {
    color: #fff;
    background: linear-gradient(180deg, #404246 0%, #36373c 100%);
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] .cc-tabbar .cc-tab.active,
body[data-theme="dark"] .cc-tabbar .cc-tab.active {
    color: #f8fafc;
    background: linear-gradient(180deg, #3d3f42 0%, #343538 100%);
    border-width: 2px;
    border-color: rgba(52, 210, 122, 0.45);
    box-shadow: none;
    transform: none;
}
html[data-theme="dark"] .cc-tabbar .cc-tab.active:hover,
body[data-theme="dark"] .cc-tabbar .cc-tab.active:hover {
    color: #fff;
    border-width: 2px;
    border-color: rgba(52, 210, 122, 0.55);
    background: linear-gradient(180deg, #47494d 0%, #393b3f 100%);
}

.cc-tabbar .cc-tab:focus-visible {
    outline: 2px solid #067f42;
    outline-offset: 3px;
}
html[data-theme="dark"] .cc-tabbar .cc-tab:focus-visible,
body[data-theme="dark"] .cc-tabbar .cc-tab:focus-visible {
    outline-color: #34d27a;
}


.bin-input-wrapper {
    position: relative;
}
.bin-input-field {
    font-family: 'Roboto Mono', 'Menlo', 'Courier New', monospace;
    letter-spacing: 0.15em;
    font-size: 1.05rem;

    padding-right: clamp(108px, 34%, 220px);
}
.bin-brand-badge {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(4, 185, 98, 0.12);
    color: #04b962;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    white-space: nowrap;

    max-width: min(280px, calc(100% - 88px));
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}
.bin-brand-badge.show { opacity: 1; }
html[data-theme="dark"] .bin-brand-badge,
body[data-theme="dark"] .bin-brand-badge {
    background: rgba(52, 210, 122, 0.18);
    color: #34d27a;
}

@media (max-width: 768px) {
    .bin-brand-badge {
        display: none !important;
    }
    .bin-input-field {
        padding-right: 15px !important;
    }
}


.main-result .output-code,
#main-result .output-code,
#main-result-adv .output-code,
#main-result-bin .output-code {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Roboto Mono', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.55;
    color: inherit;
    margin: 0;
}


#card-details-card-adv.has-results #main-result-adv,
#card-details-card-bin.has-results #main-result-bin {
    background-color: rgba(40, 167, 69, 0.05) !important;
}
html[data-theme="dark"] #card-details-card-adv.has-results #main-result-adv,
html[data-theme="dark"] #card-details-card-bin.has-results #main-result-bin,
body[data-theme="dark"] #card-details-card-adv.has-results #main-result-adv,
body[data-theme="dark"] #card-details-card-bin.has-results #main-result-bin {
    background-color: rgba(40, 167, 69, 0.1) !important;
}


#main-result-adv,
#main-result-bin {
    padding-right: 110px !important;
}
@media (max-width: 768px) {
    #main-result-adv,
    #main-result-bin {
        padding-right: 100px !important;
    }
}


.tab-pane .row.cc-gen-output-row {
    align-items: stretch;
}
.tab-pane .row.cc-gen-output-row > .scratch-card {
    align-self: stretch;
    min-height: 0;
}
#card-details-card-adv.cc-output-card,
#card-details-card-bin.cc-output-card {
    flex: 1 1 auto;
    max-height: min(78vh, calc(100vh - 8rem));
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}
#card-details-card-adv.cc-output-card .card-header,
#card-details-card-bin.cc-output-card .card-header {
    flex: 0 0 auto;
}
#main-result-adv,
#main-result-bin {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;

    max-height: none;
}
@media (max-width: 767px) {
    #card-details-card-adv.cc-output-card,
    #card-details-card-bin.cc-output-card {
        flex: 1 1 auto;
        height: auto;
        min-height: 280px;
        max-height: min(62vh, 520px);
        overflow: hidden !important;
        display: flex;
        flex-direction: column;
    }
    #main-result-adv,
    #main-result-bin {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto !important;
        overflow-x: hidden;
    }
}


.adv-select-loading-spinner {
    position: absolute;
    right: 38px;
    z-index: 10;
    pointer-events: none;
    line-height: 0;
}
.adv-select-loading-spinner svg {
    width: 16px;
    height: 16px;
    color: #04b962;
}
html[data-theme="dark"] .adv-select-loading-spinner svg,
body[data-theme="dark"] .adv-select-loading-spinner svg {
    color: #34d27a;
}


.btn-cc-reset {
    background-color: #f80 !important;
    border-color: #f80 !important;
    color: #fff !important;
}
.btn-cc-reset:hover,
.btn-cc-reset:focus {
    background-color: #e67400 !important;
    border-color: #e67400 !important;
    color: #fff !important;
}

@media (max-width: 480px) {
    .cc-tabbar .cc-tab {
        padding: 0.62rem 0.28rem;
        font-size: 11px;
        letter-spacing: 0.03em;
    }
    .cc-tabbar {
        gap: 4px;
    }
}

#cc-generator-start {
    scroll-margin-top: 96px;
}
