﻿.registration-alert-danger {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    border: 1px solid #f5c2c7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    display: inline-flex; /* auto width */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in;
    margin: 30px auto 0; /* top auto center bottom */
    text-align: center;
    max-width: 90%; /* responsiveness */
    position: relative;
}

.close-alert {
    background: none;
    border: none;
    font-size: 18px;
    color: #842029;
    cursor: pointer;
    margin-left: 8px;
    padding: 0 6px;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-5px);
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}

.fade-out {
    animation: fadeOut 0.4s ease forwards;
}


/* ====== Registration Page ====== */
.user-registration-title {
    font-size: 2rem;
    text-align: center;
    font-weight: 700;
    color: #333;
    animation: fadeDown 1s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.registration-row {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 8vh 20px;
    opacity: 0;
    animation: pageFadeIn 1s ease forwards;
}

.registration-col-md-6 {
    width: 100%;
    max-width: 415px;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.registration-form-group {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInField 0.8s forwards;
}

.registration-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444;
    font-size: 1rem;
}

.registration-form-control {
    width: 100%;
    padding: 10px 40px 10px 14px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff8f0;
    transition: all 0.3s;
    box-sizing: border-box;
}

    .registration-form-control:focus {
        border-color: #ff7e5f;
        outline: none;
        box-shadow: 0 0 5px rgba(255, 126, 95, 0.4);
    }

.registration-input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.registration-input-group-text {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    pointer-events: none;
}

#MobileNumberInput {
    padding-left: 52px;
}

.password-strength-text {
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.weak {
    color: #dc3545;
}

.medium {
    color: #ffc107;
}

.strong {
    color: #28a745;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}

input[type="password"]::-webkit-textfield-decoration-container {
    display: none !important;
}

/* Submit Button */
.registration-btn-wrapper {
    text-align: center;
}

.registration-btn-primary {
    display: inline-block;
    background: linear-gradient(to right, #ff7e5f, #feb47b);
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInField 0.8s forwards;
    animation-delay: 0.6s;
}

    .registration-btn-primary:hover {
        background: #ff7e5f;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        transform: scale(1.05);
    }


.input-error-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

    .input-error-wrapper.visible {
        max-height: 50px;
        opacity: 1;
    }

.input-error-message {
    padding-top: 6px;
    color: red;
    font-size: 0.875rem;
}

.registration-btn-link {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: #ff7e5f;
    text-decoration: none;
    margin: 2.2rem 0 1rem 0;
    transition: background 0.4s, transform 0.3s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInField 0.8s forwards;
    animation-delay: 0.7s;
}

    .registration-btn-link:hover {
        color: #feb47b;
        text-decoration: underline;
    }

/* === Modal backdrop === */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    /* === When modal is visible === */
    .modal-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

/* === Modal content box === */
.modal-content-box {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    text-align: left;
    align-items: center;
    animation: slideUp 0.5s ease-out;
}

    /* === Modal heading === */
    .modal-content-box h4 {
        margin-top: 0;
        font-size: 22px;
        color: #c0392b;
        font-weight: bold;
    }

    /* === Modal list === */
    .modal-content-box ul {
        list-style: disc inside;
        padding-left: 20px;
        margin-top: 15px;
        color: #333;
        font-size: 16px;
        line-height: 1.6;
    }

/* === Modal close button === */
.modal-close-btn {
    background-color: #c0392b;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    display: inline-block;
    text-align: center;
    transition: background-color 0.2s ease;
}

    .modal-close-btn:hover {
        background-color: #e74c3c;
    }

/* === Animation for modal content === */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === Error list items transition === */
.modal-content-box ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .modal-content-box ul li.show {
        opacity: 1;
        transform: translateY(0);
    }

/* === Staggered Animation Delay === */
.registration-form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.registration-form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.registration-form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.registration-form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.registration-form-group:nth-child(5) {
    animation-delay: 0.5s;
}

/* === Animations === */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInField {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* === Responsive === */
@media (max-width: 600px) {
    .registration-col-md-6 {
        padding: 1.5rem;
        border-radius: 10px;
    }

    .user-registration-title {
        font-size: 1.8rem;
    }
}
