@font-face {
    font-family: 'Advent Sans';
    src: url('/assets/fonts/AdventSans.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

html, body {
    background: linear-gradient(160deg, #1e3c5e 0%, #2f557f 55%, #3a6da8 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    font-family: 'Advent Sans', sans-serif !important;
}

a, .btn-link {
    color: #006bb7;
}

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

h1:focus {
    outline: none;
}

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

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

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

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

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ===== Card view (modern) ===== */
.ec-card-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 14px 14px;
}

.ec-card-panel {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 20, 50, 0.35), 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ec-card-header-band {
    height: 110px;
    background: linear-gradient(135deg, #1e3c5e 0%, #2f557f 50%, #4a7ab0 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 22px;
}

.ec-card-logo {
    height: 70px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    z-index: 1;
}

.ec-card-header-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(255,255,255,0.15), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08), transparent 50%);
}

.ec-header-actions {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.ec-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ec-icon-btn:hover, .ec-icon-btn:focus {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
}

.ec-avatar-wrap {
    margin-top: -40px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.ec-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 5px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 30, 70, 0.25);
    background: #fff;
}

.ec-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2f557f, #4a7ab0);
    color: #fff;
    font-size: 4rem;
}

.ec-card-body {
    padding: 16px 24px 28px;
}

.ec-card-name {
    font-weight: 800;
    font-size: 1.6rem;
    color: #0a294a;
    margin: 12px 0 4px;
    letter-spacing: -0.01em;
}

.ec-card-subtitle {
    font-size: 0.95rem;
    color: #5a6577;
    margin-bottom: 12px;
}

.ec-card-quote {
    font-size: 0.95rem;
    color: #6f7682;
    font-style: italic;
    margin: 8px 12px 18px;
    line-height: 1.45;
}

.ec-card-quote i.bi-quote {
    color: #b9c4d3;
    font-size: 1.1rem;
    vertical-align: -2px;
    margin: 0 2px;
}

.ec-quote-flip {
    transform: rotate(180deg);
    display: inline-block;
}

.ec-cta-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 6px 0 22px;
    flex-wrap: wrap;
}

.ec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ec-btn-primary {
    background: linear-gradient(135deg, #1f4e89 0%, #2f78c4 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(31, 78, 137, 0.35);
}

.ec-btn-primary:hover, .ec-btn-primary:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(31, 78, 137, 0.45);
}

.ec-btn-secondary {
    background: #fff;
    color: #1f4e89;
    border-color: #1f4e89;
}

.ec-btn-secondary:hover, .ec-btn-secondary:focus {
    background: #f2f6fc;
    color: #1f4e89;
}

.ec-contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    background: #f6f8fb;
    border-radius: 16px;
    overflow: hidden;
}

.ec-contact-list li + li {
    border-top: 1px solid #e7ecf3;
}

.ec-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #1f3050;
    text-decoration: none;
    transition: background 0.15s ease;
    text-align: left;
}

.ec-contact-item:hover {
    background: #eaf0f8;
    color: #1f3050;
}

.ec-contact-static {
    cursor: default;
}

.ec-contact-static:hover {
    background: transparent;
}

.ec-contact-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dde7f3, #c9d8eb);
    color: #1f4e89;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.ec-contact-value {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.95rem;
}

.ec-contact-chevron {
    color: #b3becf;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ec-social-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 6px 0 18px;
}

.ec-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f4e89 0%, #2f78c4 100%);
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(31, 78, 137, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ec-social-btn:hover, .ec-social-btn:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 78, 137, 0.45);
}

.ec-resources-panel {
    background: linear-gradient(160deg, #1e3c5e, #2f557f);
    color: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-top: 8px;
    text-align: left;
}

.ec-resources-title {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 700;
    margin: 0 0 10px;
}

.ec-resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #1f3050;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    margin-top: 8px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ec-resource-item:first-of-type {
    margin-top: 0;
}

.ec-resource-item:hover, .ec-resource-item:focus {
    background: #fff;
    color: #1f3050;
    transform: translateY(-1px);
}

.ec-resource-item .bi-box-arrow-up-right {
    color: #8595ac;
    font-size: 0.85rem;
}

/* Skeleton (stream-render placeholder) */
@keyframes ec-shimmer {
    0%   { background-position: -240px 0; }
    100% { background-position: calc(240px + 100%) 0; }
}

.ec-skeleton {
    background: linear-gradient(90deg, #e7ecf2 0%, #f3f5f9 50%, #e7ecf2 100%);
    background-size: 240px 100%;
    background-repeat: no-repeat;
    background-color: #e7ecf2;
    animation: ec-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}

.ec-skeleton-band {
    height: 110px;
    background: linear-gradient(90deg, #2a4a72 0%, #3d6699 50%, #2a4a72 100%);
    background-size: 240px 100%;
    background-color: #2a4a72;
    animation: ec-shimmer 1.4s ease-in-out infinite;
}

.ec-skeleton-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #fff;
    box-sizing: content-box;
    margin: 0 auto;
}

/* Mobile: edge-to-edge, no rounded corners, no padding around the panel. */
@media (max-width: 575.98px) {
    .ec-card-wrap {
        padding: 0;
        max-width: 100%;
    }
    .ec-card-panel {
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .ec-edit-footer {
        margin-bottom: 24px;
    }
}

.ec-skeleton-line {
    height: 14px;
    border-radius: 8px;
    margin-top: 14px;
}

.ec-skeleton-line:first-child {
    margin-top: 16px;
}

.ec-sk-w-40 { width: 40%; }
.ec-sk-w-60 { width: 60%; }
.ec-sk-w-80 { width: 80%; }

.ec-skeleton-btn {
    height: 38px;
    width: 110px;
    border-radius: 999px;
}

.ec-skeleton-row {
    height: 52px;
    border-radius: 14px;
}

/* ===== Edit page ===== */
.ec-edit-wrap {
    max-width: 1280px;
    width: 100%;
}

.ec-edit-panel {
    background-color: #fff;
}

/* Edit page header band — shorter than Card page (no avatar overlap). */
.ec-edit-band {
    height: 80px;
}

.ec-edit-band .ec-card-logo {
    height: 56px;
}

.ec-band-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ec-band-link:hover, .ec-band-link:focus {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 575.98px) {
    .ec-band-link-text {
        display: none;
    }
    .ec-band-link {
        padding: 7px 10px;
    }
}

/* Mobile: edit page goes edge-to-edge, no outer padding/rounded. */
@media (max-width: 575.98px) {
    .ec-edit-wrap {
        padding: 0 !important;
        max-width: 100%;
    }
    .ec-edit-panel {
        border-radius: 0 !important;
        box-shadow: none !important;
        min-height: 100vh;
    }
    .ec-edit-band {
        height: 70px;
    }
}

/* Bootstrap 5 has no min-width:0 utility, but flex children need it
   so long unbroken URLs wrap instead of pushing siblings out of view. */
.min-w-0 {
    min-width: 0;
}

.ec-section + .ec-section {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef0f3;
}

.ec-list .list-group-item {
    border-color: #eef0f3;
    background-color: transparent;
}

.ec-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    color: #495057;
}

.ec-row-actions .btn {
    padding: 0.25rem 0.55rem;
    line-height: 1.2;
}

.ec-row-actions .btn i {
    font-size: 0.95rem;
    vertical-align: middle;
}

.ec-add-card {
    background-color: #f6f8fb;
    border: 1px dashed #d6dde6;
    border-radius: 12px;
    padding: 14px 14px 12px;
}

.ec-edit-form {
    background-color: #f6f8fb;
    border-radius: 10px;
    padding: 10px;
}

/* On narrow screens the action buttons get a touch larger / fingertip-friendly. */
@media (max-width: 575.98px) {
    .ec-row-actions .btn {
        padding: 0.35rem 0.6rem;
    }
}

.ec-edit-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eef0f3;
    font-size: 0.85em;
}

.ec-edit-footer a {
    display: inline-block;
    padding: 6px 18px;
    color: #1f4e89;
    background-color: transparent;
    border: 1px solid #c9d6e6;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ec-edit-footer a:hover,
.ec-edit-footer a:focus {
    color: #fff;
    background-color: #1f4e89;
    border-color: #1f4e89;
    text-decoration: none;
}
