/* WISEintelligence Custom Styles */
/* Ported from WISEAlliance.Api - Visual mockup styles */

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   NEUMORPHIC STYLES (UI Version 2)
   Light, Airy, High and Tight
   ======================================== */

.neumorphic {
  background: #f5f5f7;
  box-shadow:
    6px 6px 12px rgba(163, 177, 198, 0.4),
    -6px -6px 12px rgba(255, 255, 255, 0.8);
}

.neumorphic-inset {
  background: #f5f5f7;
  box-shadow:
    inset 4px 4px 8px rgba(163, 177, 198, 0.4),
    inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.neumorphic-button {
  background: #f5f5f7;
  box-shadow:
    8px 8px 16px rgba(163, 177, 198, 0.4),
    -8px -8px 16px rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  color: #1a1a1a;
  font-weight: 500;
}

.neumorphic-button:hover {
  box-shadow:
    4px 4px 8px rgba(163, 177, 198, 0.4),
    -4px -4px 8px rgba(255, 255, 255, 0.8);
  transform: translateY(1px);
}

.neumorphic-button:active {
  box-shadow:
    inset 4px 4px 8px rgba(163, 177, 198, 0.4),
    inset -4px -4px 8px rgba(255, 255, 255, 0.8);
  transform: translateY(2px);
}

.neumorphic-card {
  background: #f5f5f7;
  box-shadow:
    8px 8px 16px rgba(163, 177, 198, 0.4),
    -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.neumorphic-input {
  background: #f5f5f7;
  box-shadow:
    inset 3px 3px 6px rgba(163, 177, 198, 0.4),
    inset -3px -3px 6px rgba(255, 255, 255, 0.8);
}

/* Enhanced PRIMARY button - BIG NEON with amazing effects */
.neumorphic-button-primary {
  background: linear-gradient(135deg, #d7ff00 0%, #CFFF04 50%, #a8cc03 100%);
  box-shadow:
    8px 8px 16px rgba(163, 177, 198, 0.5),
    -4px -4px 8px rgba(255, 255, 255, 0.6),
    0 0 0 2px rgba(207, 255, 4, 0.4),
    0 0 25px rgba(207, 255, 4, 0.5),
    0 0 50px rgba(207, 255, 4, 0.3),
    0 0 80px rgba(207, 255, 4, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #000000;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.neumorphic-button-primary:hover {
  background: linear-gradient(135deg, #dfff33 0%, #d7ff00 50%, #CFFF04 100%);
  box-shadow:
    4px 4px 8px rgba(163, 177, 198, 0.5),
    -2px -2px 4px rgba(255, 255, 255, 0.6),
    0 0 0 2px rgba(207, 255, 4, 0.7),
    0 0 40px rgba(207, 255, 4, 0.8),
    0 0 80px rgba(207, 255, 4, 0.6),
    0 0 120px rgba(207, 255, 4, 0.4);
  transform: translateY(-2px) scale(1.02);
}

.neumorphic-table-header {
  background: #f5f5f7;
  box-shadow:
    inset 2px 2px 4px rgba(163, 177, 198, 0.3),
    inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

/* ========================================
   FLAT MINIMAL STYLES (UI Version 3)
   Extremely flat, 2 colors max, NO SHADOWS
   ======================================== */

.flat-v3 {
  background: #ffffff;
  border: none;
  box-shadow: none !important;
}

.flat-v3-button {
  background: linear-gradient(135deg, #d7ff00 0%, #CFFF04 50%, #a8cc03 100%);
  color: #000000;
  border: none;
  box-shadow:
    0 0 20px rgba(207, 255, 4, 0.4),
    0 0 40px rgba(207, 255, 4, 0.2) !important;
  transition: all 0.15s ease;
  font-weight: 600;
}

.flat-v3-button:hover {
  background: linear-gradient(135deg, #dfff33 0%, #d7ff00 50%, #CFFF04 100%);
  transform: translateY(-1px);
  box-shadow:
    0 0 30px rgba(207, 255, 4, 0.6),
    0 0 60px rgba(207, 255, 4, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.flat-v3-button:active {
  background: linear-gradient(135deg, #a8cc03 0%, #d7ff00 50%, #CFFF04 100%);
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 15px rgba(207, 255, 4, 0.5) !important;
}

.flat-v3-button-secondary {
  background: #f5f5f5;
  color: #1a1a1a;
  border: 1px solid #e5e5e5;
  box-shadow: none !important;
  transition: background 0.15s ease;
}

.flat-v3-button-secondary:hover {
  background: #e5e5e5;
  transform: none !important;
  box-shadow: none !important;
}

.flat-v3-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: none !important;
}

.flat-v3-input {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: none !important;
}

.flat-v3-input:focus {
  border-color: #1a1a1a;
  outline: none;
  box-shadow: none !important;
}

.flat-v3-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: none !important;
}

.flat-v3-table-header {
  background: #f5f5f5;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: none !important;
}

.flat-v3-table-cell {
  background: #ffffff;
  border-bottom: 1px solid #f5f5f5;
  box-shadow: none !important;
}

/* ========================================
   UNIVERSAL NEON BUTTON
   Works across all UI versions
   ======================================== */

.neon-button {
  background: linear-gradient(135deg, #d7ff00 0%, #CFFF04 50%, #a8cc03 100%);
  color: #000000;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  box-shadow:
    0 0 20px rgba(207, 255, 4, 0.4),
    0 0 40px rgba(207, 255, 4, 0.2);
}

.neon-button:hover {
  background: linear-gradient(135deg, #dfff33 0%, #d7ff00 50%, #CFFF04 100%);
  box-shadow:
    0 0 30px rgba(207, 255, 4, 0.6),
    0 0 60px rgba(207, 255, 4, 0.4);
  transform: translateY(-1px);
}

.neon-button:active {
  background: linear-gradient(135deg, #a8cc03 0%, #d7ff00 50%, #CFFF04 100%);
  transform: translateY(1px);
  box-shadow:
    0 0 15px rgba(207, 255, 4, 0.5),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   WISE BRAND COLORS
   ======================================== */

:root {
  --wise-primary: #3B3CE8;
  --wise-primary-hover: #1B19B5;
  --wise-primary-dark: #0A0969;
  --wise-dark: #1A102C;
  --wise-gray-50: #FBF9FF;
  --wise-gray-100: #F4F2F9;
  --wise-gray-200: #E0DBE7;
}

/* ========================================
   BLAZOR ERROR UI
   ======================================== */

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

/* ========================================
   LOADING PROGRESS
   ======================================== */

.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: #3B3CE8;
    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");
}

/* ========================================
   FLOATING INPUT STYLES
   For attestation sections (expanded rows)
   ======================================== */

.attestation-section .floating-input-wrapper {
    position: relative;
    min-width: 0;
    min-height: 54px;
}

.attestation-section .floating-input-wrapper .floating-input {
    font-size: 16px;
    padding: 24px 16px 8px;
    min-height: 54px;
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.attestation-section .floating-input-wrapper .floating-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.attestation-section .floating-input-wrapper .floating-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.2s ease;
    background: #ffffff;
    padding: 0 4px;
}

/* Label floats up when input is focused or has value */
.attestation-section .floating-input-wrapper .floating-input:focus + .floating-label,
.attestation-section .floating-input-wrapper .floating-input:not(:placeholder-shown) + .floating-label,
.attestation-section .floating-input-wrapper .floating-input.has-value + .floating-label {
    top: -10px;
    transform: none;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
}

/* Number input: extra right padding for spinner */
.attestation-section .floating-input-wrapper .floating-input[type="number"] {
    padding-right: 32px;
}

/* Missing field (red border and label) */
.attestation-section .manual-field-missing .floating-input {
    border-color: #dc2626 !important;
    background-color: #ffffff !important;
}

.attestation-section .manual-field-missing .floating-label {
    color: #dc2626 !important;
}

.attestation-section .manual-field-missing .floating-input:focus + .floating-label,
.attestation-section .manual-field-missing .floating-input.has-value + .floating-label,
.attestation-section .manual-field-missing .floating-input:not(:placeholder-shown) + .floating-label {
    color: #dc2626 !important;
}

.attestation-section .manual-field-missing .floating-input:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Read-only floating inputs (for view mode) */
.attestation-section .floating-input-wrapper .floating-input[readonly] {
    background-color: #f9fafb;
    cursor: default;
}

.attestation-section .manual-field-missing .floating-input[readonly] {
    /*background-color: #fef2f2 !important;*/
}

/* For missing fields (empty readonly inputs), always float the label up */
.attestation-section .manual-field-missing .floating-input[readonly] + .floating-label {
    top: -10px;
    transform: none;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
}

/* Edit mode: always float labels for editable inputs */
.attestation-section .floating-input-wrapper .floating-input:not([readonly]) + .floating-label {
    top: -10px;
    transform: none;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
}

/* Edit mode: red label for missing fields */
.attestation-section .manual-field-missing .floating-input:not([readonly]) + .floating-label {
    color: #dc2626;
}
