/* app.css — Dark mode base overrides for Umeko App */
/* umeko.css loaded after this sets the full cherry blossom dark theme */

html, body {
    background-color: #1a1a2e;
    color: #eaeaea;
    font-family: 'Inter', system-ui, sans-serif;
    height: 100%;
}

/* Override Bootstrap light link color */
a, .btn-link {
    color: #c77dff;
}

a:hover {
    color: #e91e8c;
}

/* Dark form controls */
.form-control, .form-select {
    background-color: #0f3460;
    border-color: rgba(233, 30, 140, 0.3);
    color: #eaeaea;
}

.form-control:focus, .form-select:focus {
    background-color: #0f3460;
    border-color: #e91e8c;
    color: #eaeaea;
    box-shadow: 0 0 0 0.2rem rgba(233, 30, 140, 0.25);
}

.form-control::placeholder {
    color: #a0a0b0;
}

/* Dark inputs (non-bootstrap) */
input, textarea, select {
    background-color: #0f3460 !important;
    border: 1px solid rgba(199, 125, 255, 0.3) !important;
    color: #eaeaea !important;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #e91e8c !important;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
}

/* Dark buttons */
.btn-primary {
    background-color: #e91e8c;
    border-color: #e91e8c;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: all 250ms ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #c4177a;
    border-color: #c4177a;
    box-shadow: 0 0 12px rgba(233, 30, 140, 0.4);
}

.btn-secondary {
    background-color: #16213e;
    border-color: rgba(199, 125, 255, 0.4);
    color: #c77dff;
}

.btn-secondary:hover {
    background-color: #0f3460;
    border-color: #c77dff;
    color: #eaeaea;
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(233, 30, 140, 0.3);
}

/* Dark cards / panels */
.card {
    background-color: #16213e;
    border: 1px solid rgba(199, 125, 255, 0.15);
    color: #eaeaea;
    border-radius: 12px;
}

.card-header {
    background-color: #0f3460;
    border-bottom-color: rgba(233, 30, 140, 0.2);
    color: #c77dff;
}

/* Bootstrap table dark */
.table {
    color: #eaeaea;
}

.table > :not(caption) > * > * {
    background-color: #16213e;
    border-bottom-color: rgba(199, 125, 255, 0.1);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(15, 52, 96, 0.5);
}

/* Nav tabs dark */
.nav-tabs {
    border-bottom-color: rgba(233, 30, 140, 0.3);
}

.nav-tabs .nav-link {
    color: #a0a0b0;
    border-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: #c77dff;
    border-color: rgba(199, 125, 255, 0.2);
}

.nav-tabs .nav-link.active {
    background-color: #16213e;
    border-color: rgba(233, 30, 140, 0.4) rgba(233, 30, 140, 0.4) #16213e;
    color: #e91e8c;
}

/* Modal dark */
.modal-content {
    background-color: #16213e;
    border: 1px solid rgba(199, 125, 255, 0.2);
    color: #eaeaea;
}

.modal-header {
    border-bottom-color: rgba(233, 30, 140, 0.2);
}

.modal-footer {
    border-top-color: rgba(233, 30, 140, 0.2);
}

.modal-backdrop {
    background-color: #000;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #56cfb2;
}

.invalid {
    outline: 1px solid #e63946;
}

.validation-message {
    color: #e63946;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #1a1a2e;
    border-top: 2px solid #e91e8c;
    color: #eaeaea;
    bottom: 0;
    box-shadow: 0 -2px 12px rgba(233, 30, 140, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: #c77dff;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: rgba(233, 30, 140, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e91e8c;
}

/* Selection */
::selection {
    background: rgba(233, 30, 140, 0.3);
    color: #eaeaea;
}

/* Loading progress */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}

.loading-progress circle {
    fill: none;
    stroke: #e91e8c;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: rgba(199, 125, 255, 0.2);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: #c77dff;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}
