/* ===================================================
   DOPLr Identity Pages — Split-Panel Design
   =================================================== */

/* --- Animated gradient background --- */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

html.identity-page,
body.identity-page {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.identity-bg {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(-45deg, #0a0e27, #1a237e, #0d47a1, #01579b, #006064, #1b5e20, #1a237e, #0a0e27);
    background-size: 600% 600%;
    animation: gradientShift 30s ease infinite;
   
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-y: auto;
}

/* --- Top navigation bar --- */
.identity-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.identity-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.identity-logo img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity 0.2s;
}

.identity-logo:hover img {
    opacity: 0.85;
}

.identity-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
}


.identity-btn-ext-kul-img {
    max-height: 30px;
    width: auto;
    display: block;
}

.identity-demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    white-space: nowrap;
}

.identity-demo-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
    transform: translateY(-1px);
}

.identity-demo-btn:active {
    transform: translateY(0);
}

/* --- Main split panel container --- */
.identity-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
}

.identity-panel {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 580px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* --- Left panel (carousel) --- */
.identity-panel-left {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    min-height: 480px;
}

/* Bootstrap carousel overrides */
.identity-carousel {
    height: 100%;
    position: relative;
}

.identity-carousel .carousel-inner {
    height: 100%;
    pointer-events: none;
}

.identity-carousel .carousel-item {
    height: 100%;
    pointer-events: none;
}

.carousel-slide {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    text-align: center;
}

.carousel-slide-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.carousel-slide-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.carousel-slide-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 340px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.carousel-slide-bg-1 {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.6) 0%, rgba(2, 136, 209, 0.4) 100%);
}

.carousel-slide-bg-2 {
    background: linear-gradient(135deg, rgba(0, 96, 100, 0.6) 0%, rgba(0, 150, 136, 0.4) 100%);
}

.carousel-slide-bg-3 {
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.6) 0%, rgba(56, 142, 60, 0.4) 100%);
}

.carousel-slide-bg-4 {
    background: linear-gradient(135deg, rgba(74, 20, 140, 0.6) 0%, rgba(123, 31, 162, 0.4) 100%);
}

.identity-carousel .carousel-control-prev,
.identity-carousel .carousel-control-next {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
}

.identity-carousel .carousel-control-prev {
    left: 16px;
}

.identity-carousel .carousel-control-next {
    right: 16px;
}

.identity-carousel .carousel-control-prev:hover,
.identity-carousel .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.identity-carousel .carousel-control-prev-icon,
.identity-carousel .carousel-control-next-icon {
    width: 16px;
    height: 16px;
}

.identity-carousel .carousel-indicators {
    bottom: 20px;
}

.identity-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s, transform 0.2s;
}

.identity-carousel .carousel-indicators .active {
    background: #ffffff;
    transform: scale(1.3);
}

/* --- Right panel (form) --- */
.identity-panel-right {
    flex: 0 0 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 40px;
    background: rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

.identity-form-header {
    margin-bottom: 28px;
}

.identity-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.identity-form-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
}

/* --- Form fields --- */
.identity-form .form-floating {
    margin-bottom: 16px;
}

.identity-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 12px 16px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.identity-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.identity-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    color: #ffffff;
    outline: none;
}

.identity-form .form-floating label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    padding: 12px 16px;
}

.identity-form .form-floating > .form-control:focus ~ label,
.identity-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Chrome autofill fix */
.identity-form .form-control:-webkit-autofill,
.identity-form .form-control:-webkit-autofill:hover,
.identity-form .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 30px rgba(30, 60, 120, 0.9) inset;
    caret-color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Checkbox */
.identity-form .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.identity-form .form-check-input:checked {
    background-color: #2196F3;
    border-color: #2196F3;
}

.identity-form .form-check-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
}

/* --- Primary submit button --- */
.identity-btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1565C0, #0288d1);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(2, 136, 209, 0.35);
    margin-top: 8px;
    letter-spacing: 0.02em;
}

.identity-btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.5);
}

.identity-btn-primary:active {
    transform: translateY(0);
}

/* --- External auth section --- */
.identity-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.identity-divider::before,
.identity-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.identity-ext-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.identity-btn-ext {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.identity-btn-ext:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.identity-btn-ext:active {
    transform: translateY(0);
}

.identity-btn-ext-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Google-specific */
.identity-btn-ext.google-btn {
    background: rgba(255, 255, 255, 0.12);
}

.identity-btn-ext.google-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* KU Leuven-specific */
.identity-btn-ext.kuleuven-btn {
    background: rgba(0, 103, 166, 0.15);
    border-color: rgba(0, 103, 166, 0.4);
}

.identity-btn-ext.kuleuven-btn:hover {
    background: rgba(0, 103, 166, 0.3);
    border-color: rgba(0, 103, 166, 0.6);
}

/* --- Form links --- */
.identity-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 20px;
}

.identity-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.identity-link:hover {
    color: #ffffff;
    text-decoration: underline;
}




.authenticator-container {
    max-height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

    .authenticator-container::-webkit-scrollbar {
        width: 8px;
    }

    .authenticator-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .authenticator-container::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

        .authenticator-container::-webkit-scrollbar-thumb:hover {
            background: #555;
        }


/* --- Error / validation messages --- */
.identity-errors {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #fca5a5;
    font-size: 0.875rem;
    line-height: 1.5;
}

.identity-errors ul {
    margin: 0;
    padding: 0 0 0 18px;
}

.identity-errors li {
    margin-bottom: 2px;
}

.identity-field-error {
    color: #fca5a5;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* Override ASP.NET text-danger in dark theme */
.identity-form .text-danger {
    color: #fca5a5!important;
    font-size: 0.8rem;
}

/* --- Info / success messages --- */
.identity-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #93c5fd;
    font-size: 0.875rem;
    line-height: 1.5;
}

.identity-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #86efac;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* --- Footer --- */
.identity-footer {
    text-align: center;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* --- 2FA specific --- */
.identity-2fa-key {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    word-break: break-all;
    margin: 8px 0;
}

.identity-qr-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    display: inline-block;
    margin: 12px 0;
}

.identity-steps {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.7;
    padding-left: 20px;
}

.identity-steps li {
    margin-bottom: 8px;
}

.identity-steps a {
    color: #64b5f6;
    text-decoration: none;
}

.identity-steps a:hover {
    text-decoration: underline;
}

/* ===================================================
   Responsive — hide carousel on small screens
   =================================================== */
@media (max-width: 768px) {
    html.identity-page,
    body.identity-page {
        overflow: auto;
    }

    .identity-bg {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .identity-topbar {
        padding: 12px 20px;
    }

    .identity-logo-text {
        font-size: 1.2rem;
    }

    .identity-demo-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .identity-main {
        padding: 12px 16px;
        align-items: flex-start;
    }

    .identity-panel {
        flex-direction: column;
        min-height: unset;
        max-width: 100%;
        height: 100vh;
        border-radius: 16px;
    }

    .identity-panel-left {
        display: none !important;
    }

    .identity-panel-right {
        flex: unset;
        width: 100%;
        padding: 32px 24px;
        overflow-y: auto;
        max-height: 100%;
    }
}

@media (max-width: 480px) {
    .identity-topbar {
        padding: 10px 16px;
    }

    .identity-panel-right {
        padding: 24px 20px;
    }

    .identity-form-title {
        font-size: 1.5rem;
    }
}

/* ===================================================
   Full-panel mode — when no carousel is needed
   (e.g., manage pages that opt into this layout)
   =================================================== */
.identity-panel.no-carousel .identity-panel-left {
    display: none !important;
}

.identity-panel.no-carousel .identity-panel-right {
    flex: 1;
    max-width: 520px;
    margin: 0 auto;
}
