@tailwind base;
@tailwind components;
@tailwind utilities;

/** {*/
/*    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";*/
/*    font-weight: bold;*/
/*}*/

html, body {
    font-family: 'Inter', Inter, Helvetica, Arial, sans-serif;
    color: rgb(55, 65, 81); /* text-gray-700 */
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* App Initializer Loading Styles */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background-color: #f8fafc;
}

.loading-spinner {
    text-align: center;
    color: #64748b;
    font-size: 1.125rem;
}

.loading-spinner p {
    margin-top: 1rem;
    font-weight: 500;
}

/* Loaders */
.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    position: relative;
    border: 4px solid #00A7E9;
    top: 50%;
    animation: loader 2s infinite ease;
}

.loader-inner {
    vertical-align: top;
    display: inline-block;
    width: 100%;
    background-color: #00A7E9;
    animation: loader-inner 2s infinite ease-in;
}

@keyframes loader {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(180deg);
    }

    50% {
        transform: rotate(180deg);
    }

    75% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes loader-inner {
    0% {
        height: 0%;
    }

    25% {
        height: 0%;
    }

    50% {
        height: 100%;
    }

    75% {
        height: 100%;
    }

    100% {
        height: 0%;
    }
}

/* END LOADERS */

/* CUSTOM JAVELIN THEME */
/* How to use: Add bg-javelin-[--] to any element to apply the Javelin theme.
   Replace [--] with primary, secondary, etc. 
   Example: <button class="bg-javelin-primary">
   Auto-complete will suggest bg-javelin-primary, bg-javelin-secondary, etc.
   This is what the theme does in the tailwind.config.js file.
*/

.bg-javelin-primary { /* ION blue */
    background-color: #00A7E9 !important;
}

.bg-javelin-secondary { /* Hot (Neon) Pink */
    background-color: #ff45e5 !important;
}

.bg-javelin-tertiary { /* Mustard Yellow (Warmth) */
    background-color: #feb019 !important;
}

.bg-javelin-neutral { /* Pure White */
    background-color: #ffffff !important;
}

.bg-javelin-base-100 { /* For background webpage */
    background-color: #f8f8f8 !important;
}

.bg-javelin-base-200 {
    background-color: #f7f7f7 !important;
}

.bg-javelin-info { /* Sky Blue (Informative and Eye-catching) */
    background-color: #008ffb !important;
}

.bg-javelin-success { /* Forest Green (Success and Growth) */
    background-color: #00e935 !important;
}

.bg-javelin-achievement { /* USED FOR TEXT (Darker Green works well on white) */
    background-color: #00CA08 !important;
}

.bg-javelin-sage { /* Same green used at Sage */
    background-color: #08D73F !important;
}

.bg-javelin-caution { /* Radioactive Orange (Caution) */
    background-color: #fe7b37 !important;
}

.bg-javelin-caution-dark { /* Radioactive Orange (Caution) */
    background-color: #e16220 !important;
}

.bg-javelin-warning { /* Light Coral (Grabs attention without being threatening) */
    background-color: #ff4560 !important;
}

.bg-javelin-danger-dark { /* Red (Danger/Error) */
    background-color: #ff0025 !important;
}

.bg-javelin-danger-dark { /* Red (Danger/Error) */
    background-color: #dc0020 !important;
}

.border-javelin-primary {
    border-color: #00A7E9 !important;
}

.border-javelin-secondary {
    border-color: #ff45e5 !important;
}

.border-javelin-tertiary {
    border-color: #feb019 !important;
}

.border-javelin-neutral {
    border-color: #ffffff !important;
}

.border-javelin-base-100 {
    border-color: #f8f8f8 !important;
}

.border-javelin-info {
    border-color: #008ffb !important;
}

.border-javelin-success {
    border-color: #00e935 !important;
}

.border-javelin-achievement {
    border-color: #00CA08 !important;
}

.border-javelin-sage {
    border-color: #08D73F !important;
}

.border-javelin-caution {
    border-color: #fe7b37 !important;
}

.border-javelin-warning {
    border-color: #ff4560 !important;
}

.border-javelin-danger {
    border-color: #ff0025 !important;
}

.text-javelin-primary {
    color: #00A7E9 !important;
}

.text-javelin-secondary {
    color: #ff45e5 !important;
}

.text-javelin-tertiary {
    color: #feb019 !important;
}

.text-javelin-neutral {
    color: #ffffff !important;
}

.text-javelin-base-100 {
    color: #f8f8f8 !important;
}

.text-javelin-info {
    color: #008ffb !important;
}

.text-javelin-success {
    color: #00e935 !important;
}

.text-javelin-achievement {
    color: #00CA08 !important;
}

.text-javelin-sage {
    color: #08D73F !important;
}

.text-javelin-caution {
    color: #fe7b37 !important;
}

.text-javelin-warning {
    color: #ff4560 !important;
}

.text-javelin-danger {
    color: #ff0025 !important;
}

.text-javelin-gray {
    color: #828282!important;
}

/* END CUSTOM JAVELIN THEME */

/* Javelin Buttons */

.btn-jav {
    background-color: #ffffff; 
    border-color: rgb(55, 65, 81); /* text-gray-700 */
    border-radius: 0.5rem;
    height: 3.5rem;
    min-height: 2rem;
    width: 12rem;
    min-width: 8rem;
    color: #ffffff;
    font-weight: bold;
}

.btn-jav-small {
    background-color: #ffffff; 
    border-color: rgb(55, 65, 81); /* text-gray-700 */
    border-radius: 0.5rem;
    height: 3.5rem;
    min-height: 2rem;
    width: 12rem;
    min-width: 6rem;
    color: #ffffff;
    font-weight: bold;
}

.btn-jav-report {
    background-color: #ff0025; /* jav-danger */
    border-color: rgb(55, 65, 81); /* text-gray-700 */
    border-radius: 0.5rem;
    height: 4rem;
    min-height: 3rem;
    width: 8rem;
    min-width: 8rem;
    color: #ffffff;
    font-weight: bold;
}
.btn-jav-fa {
    background-color: #008ffb; /* jav-info */
    border-color: rgb(55, 65, 81); /* text-gray-700 */
    border-radius: 0.5rem;
    height: 4rem;
    min-height: 3rem;
    width: 8rem;
    min-width: 8rem;
    color: #ffffff;
    font-weight: bold;
}
.btn-jav-ignore {
    background-color: #fe7b37; /* jav-caution */
    border-color: rgb(55, 65, 81); /* text-gray-700 */
    border-radius: 0.5rem;
    height: 4rem;
    min-height: 3rem;
    width: 8rem;
    min-width: 8rem;
    color: #ffffff;
    font-weight: bold;
}
.btn-jav-save {
    background-color: #00e935; /* jav-success */
    border-color: rgb(55, 65, 81); /* text-gray-700 */
    border-radius: 0.5rem;
    height: 4rem;
    min-height: 3rem;
    width: 8rem;
    min-width: 8rem;
    color: #ffffff;
    font-weight: bold;
}

/* END Javelin Buttons */

/* Javelin Reason Spans */
/* FOR USE IN DISPLAYING COMPLIANCE REASON */

.reason-bad-description {
    display: inline-block;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: rgb(220 38 38);
    background-color: rgb(254 226 226);
    border-color: rgb(220 38 38);
    border-width: 1px;
    border-radius: 9999px;
}
.reason-no-description {
    display: inline-block;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: rgb(37 99 235);
    background-color: rgb(219 234 254);
    border-color: rgb(37 99 235);
    border-width: 1px;
    border-radius: 9999px;
}
.reason-incorrect-value {
    display: inline-block;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: rgb(22 163 74);
    background-color: rgb(220 252 231);
    border-color: rgb(22 163 74);
    border-width: 1px;
    border-radius: 9999px;
}
.reason-wrong-category {
    display: inline-block;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: rgb(202 138 4);
    background-color: rgb(254 249 195);
    border-color: rgb(202 138 4);
    border-width: 1px;
    border-radius: 9999px;
}

/* PAGINATION */

.pagination {
    display: inline-flex;
    align-items: center;
    background-color: #f7f7f7;
    padding: 0.5rem 0.5rem;
    border-radius: 9999px;
}

.pagination-value {
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    line-height: 1.25px;
}
.pagination-value:hover {
    background-color: #ffffff;
    box-shadow:  0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/* END PAGINATION */

/* Cards */

@layer components {
    .stat-card {
        overflow: visible;
        border-radius: 0.5rem;
        background-color: #ffffff;
        padding: 1.25rem 1rem;
        box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.1);
    }
}

/* END Cards */

/* Toasts */

@layer components {
    .toast {
        position: fixed;
        /* top: 1rem; */
        bottom: 1rem;
        right: 1rem;
        z-index: 9999; /* Above the toast */
        width: 400px;
        overflow: hidden;
        max-width: 20rem;
        padding: 1.25rem 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.1);
        background-color: #ffffff;
        opacity: 90%;
    }

    .toast-container {
        position: fixed;
        top: 1rem;
        bottom: 1rem;
        right: 1rem;
        z-index: 9999; /* Above the toast */
        width: 300px;
    }
}

/* END Toasts */

.btn {
    display: inline-block;
    font-weight: 400;
    background-color: #ffffff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Currently not in use */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 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;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1s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OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

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

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

/*.loading-progress circle:last-child {*/
/*    stroke: #1b6ec2;*/
/*    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;
}

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

code {
    color: #c02d76;
}

/* Validation Hotkey Styles */
.record-active {
    border: 4px solid #2563eb !important;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4) !important;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.12)) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.record-hover {
    border: 2px solid #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.record-hover:hover {
    border-color: #64748b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.hotkey-indicator {
    position: absolute;
    top: -12px;
    left: -12px;
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.btn-validation {
    position: relative;
    overflow: visible;
}

.btn-validation:hover .hotkey-indicator {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transform: scale(1.15);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4), 0 3px 6px rgba(0, 0, 0, 0.2);
}

kbd {
    background: linear-gradient(135deg, #374151, #4b5563);
    border: 1px solid #6b7280;
    border-radius: 6px;
    color: #ffffff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: inline-block;
    min-width: 24px;
    text-align: center;
    letter-spacing: 0.5px;
}

.hotkey-help-panel {
    backdrop-filter: blur(8px);
    background: rgba(17, 24, 39, 0.95);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.status-bar {
    backdrop-filter: blur(8px);
    background: rgba(31, 41, 55, 0.95);
    border-top: 1px solid #374151;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.active-record-badge {
    background: linear-gradient(135deg, #2563eb, #3b82f6, #8b5cf6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    animation: pulse 2s infinite;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3), 0 0 0 0 rgba(37, 99, 235, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5), 0 0 0 8px rgba(37, 99, 235, 0);
        transform: scale(1.02);
    }
}

.validation-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.validation-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.9), rgba(75, 85, 99, 0.8));
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(156, 163, 175, 0.3);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.validation-stats .stat .label {
    font-size: 0.8rem;
    color: #d1d5db;
    font-weight: 500;
}

.validation-stats .stat .value {
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}
