/* 
Author: M Ahammad Ullah Rifat
Author url: msoftbd.com
*/

/* ========= ROOT VARIABLES ========= */
:root {
    --primary-color: #007BFF; /* Bootstrap success blue */
    --secondary-color: #198754; /* Bootstrap primary green */
    --danger-color: #dc3545;
    --warning-color: #fd7e14;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --muted-text: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --form-max-width: 520px;
    --form-min-width: 400px;
}

/* ========= COMMON STYLES ========= */
.con-log-bg {
    background: url(../../uploads/port-bg-image.png) no-repeat bottom 70px center;
    padding: 20px 0 100px 0;
    background-size: contain;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #DADADA;
    width: 100%;
}

.main_logo {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 1000;
}

.main_logo img {
    max-width: 150px;
    transition: transform 0.3s;
}

.main_logo img:hover {
    transform: scale(1.05);
}

.reg_inner {
    position: relative;
    z-index: 999;
    width: 100%;
    max-width: var(--form-max-width);
    min-width: var(--form-min-width);
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reg_inner_cont {
    padding: 40px 30px 15px;
    position: relative;
    z-index: 999;
    background: #FFFFFF;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
}

.brand_logo_container {
    position: absolute;
    height: 100px;
    width: 100px;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #DADADA;
    padding: 10px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    z-index: 1000;
}

.brand_logo_container:hover {
    transform: translateX(-50%) translateY(-5px);
}

.brand_logo {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: contain;
}

#my-form .form {
    width: 100%;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.home_link {
    background: #EFF8F1;
    border-radius: var(--border-radius) var(--border-radius) 0px 0px;
    padding: 10px;
}

.home_link a {
    color: var(--primary-color);
    line-height: 26px;
    font-weight: 400;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.home_link a:hover {
    text-decoration: underline;
    color: #157347;
}

#my-form .my-form {
    margin: 0 auto 15px;
}

#my-form div.logo {
    text-align: center;
}

#my-form div.logo img.logo {
    max-height: 35px;
    margin-bottom: 10px;
}

.logo-title {
    font-size: 14px;
    color: var(--dark-text);
    font-weight: 500;
    line-height: 18px;
}

.my-form-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.my-form-group .floating-label {
    position: absolute;
    left: 15px;
    top: 12px;
    color: var(--muted-text);
    pointer-events: none;
    transition: var(--transition);
    font-size: 16px;
    background: transparent;
    padding: 0 5px;
    z-index: 1;
}

.my-form-group .form-control {
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    padding: 18px 15px;
    transition: var(--transition);
    width: 100%;
    height: 45px;
    font-size: 16px;
    position: relative;
    z-index: 2;
    background: transparent;
}

.my-form-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
    outline: none;
}

.my-form-group .form-control:focus ~ label.floating-label,
.my-form-group .form-control:not(:placeholder-shown) ~ label.floating-label {
    top: -15px;
    left: 10px;
    background: #fff;
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 600;
    z-index: 3;
}

.my-form-group-error .form-control {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: 2.5rem;
}

.my-form-group-error .floating-label {
    color: var(--danger-color) !important;
}

.my-form-group-error .error-message {
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: left;
    font-size: 14px;
    padding-top: 5px;
    color: var(--danger-color);
    font-weight: 500;
}

.my-form-group-error .error-message:before {
    content: "⚠";
    margin-right: 5px;
}

.my-form-group-success .form-control {
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.show-password {
    position: absolute;
    top: 12px;
    right: 15px;
    cursor: pointer;
    color: var(--muted-text);
    transition: var(--transition);
    z-index: 3;
}

.show-password:hover {
    color: var(--primary-color);
}

.customlebel {
    float: left;
    line-height: 24px;
    cursor: pointer;
    font-size: 14px;
    color: #606268;
}

.password_wrong a {
    float: left;
    line-height: 20px;
    font-size: 12px;
    text-decoration: none;
    color: #000;
    transition: var(--transition);
}

.password_wrong a:hover {
    color: var(--primary-color);
    text-decoration: underline !important;
}

.or_button {
    padding: 8px;
    border-radius: var(--border-radius);
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #000;
    margin: 0 5px;
    display: block;
    min-height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 12px;
    max-width: 100px;
    transition: var(--transition);
}

.or_button:hover {
    background: #d7d7d7;
    color: #000;
    transform: translateY(-2px);
}

.or_button img {
    margin: 0 auto;
}

.reg_btn {
    background: var(--primary-color) !important;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    width: 100%;
    margin-bottom: 15px;
    font-size: 16px;
}

.reg_btn:hover {
    background: #157347 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reg_btn:active {
    transform: translateY(0);
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from { transform: rotate(0turn); }
    to { transform: rotate(1turn); }
}

.static_text {
    width: 80%;
    text-align: center;
    border-bottom: 1px solid #000;
    line-height: 0.1em;
    margin: 10px auto 25px;
}

.static_text span {
    background: #fff;
    padding: 0 5px;
    color: var(--muted-text);
}

.mygov_acc a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.mygov_acc a:hover {
    text-decoration: underline !important;
    color: #157347;
}

.help_login {
    max-width: 85%;
    margin: 0 auto;
}

.help_login ul {
    padding-left: 0px !important;
    margin-bottom: 0px;
}

.help_login ul li {
    list-style: none;
    display: inline-block;
    padding: 0 5px;
}

.help_login ul li a {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.help_login ul li a:hover {
    text-decoration: underline;
    color: #157347;
}

.otp-code {
    list-style: none;
    margin: 0;
    padding: 0;
}

.otp-code li {
    text-align: center;
    display: inline-block;
    margin-right: 10px;
}

.otp-code li input {
    font-size: 16px;
    text-align: center;
    width: 40px;
    height: 35px;
}

.number .verify_change {
    text-align: left;
}

.number .verify_change a {
    color: var(--primary-color);
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
}

.number .verify_change a:hover {
    text-decoration: underline;
}

.again_code a {
    float: right;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.again_code a:hover {
    text-decoration: underline;
}

.h:hover {
    background-color: rgb(215, 253, 213);
}

label.floating-label.reg-input {
    left: 101px;
}

.my-form-group.identity-trigger {
    text-align: left;
}

/* ========= PASSWORD STRENGTH INDICATOR ========= */
.password-indicator {
    margin-top: 5px;
    margin-bottom: 5px;
}

.password-strength-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    display: none;
}

.password-strength-bar {
    flex-grow: 1;
    height: 5px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.5s ease, background-color 0.3s;
}

.strength-text {
    font-size: 0.85rem;
    min-width: 80px;
    text-align: right;
}

.strength-text.weak {
    color: var(--danger-color);
}

.strength-text.medium {
    color: var(--warning-color);
}

.strength-text.strong {
    color: var(--primary-color);
}

.strength-text.very-strong {
    color: #20c997;
}

.password-match {
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.password-match.valid {
    color: var(--primary-color);
}

.password-match.invalid {
    color: var(--danger-color);
}

/* Strength level colors */
.password-strength-bar.weak span { background-color: var(--danger-color); }
.password-strength-bar.medium span { background-color: var(--warning-color); }
.password-strength-bar.strong span { background-color: var(--primary-color); }
.password-strength-bar.very-strong span { background-color: #20c997; }

/* ========= OTP VERIFICATION STYLES ========= */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: white;
}

.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(25, 135, 84, 0.2);
    transform: scale(1.05);
    outline: none;
}

.otp-input.filled {
    border-color: var(--primary-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.resend-otp {
    text-align: center;
    margin-top: 20px;
}

.resend-otp button {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.resend-otp button:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

.resend-otp button:disabled {
    color: #aaa;
    cursor: not-allowed;
}

.countdown {
    color: var(--muted-text);
    font-size: 14px;
    margin-top: 5px;
}

.otp-error {
    color: var(--danger-color);
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

/* ========= TIMER STYLES ========= */
.timer-container {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 15px 0;
    box-shadow: var(--box-shadow);
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--danger-color);
    text-align: center;
}

.timer-label {
    font-size: 0.9rem;
    color: var(--muted-text);
    text-align: center;
    margin-bottom: 5px;
}

.timer-separator {
    padding: 0 5px;
}

.counting {
    display: inline-block;
    animation: pulse 0.5s ease;
    transform-origin: center;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ========= SWEETALERT CUSTOM STYLES ========= */
.swal2-popup {
    border-radius: var(--border-radius) !important;
    max-width: 500px !important;
    font-family: inherit !important;
}

.swal2-title {
    color: var(--dark-text) !important;
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
}

.swal2-html-container {
    font-size: 1.1rem;
    margin-bottom: 1.5rem !important;
    color: var(--muted-text) !important;
}

.swal2-confirm {
    background-color: var(--primary-color) !important;
    border: none !important;
    padding: 10px 25px !important;
    border-radius: var(--border-radius) !important;
    transition: var(--transition) !important;
}

.swal2-confirm:hover {
    background-color: #157347 !important;
}

.swal2-popup .btn-verify {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 15px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.swal2-popup .btn-verify:hover {
    background-color: #218838;
}

/* ========= FOOTER STYLES ========= */
footer {
    height: 70px;
    overflow: hidden;
    font-family: 'Noto Sans Bengali';
    position: fixed;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to right, #f8f9fa, #e9ecef, #f8f9fa);
    padding: 20px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

footer img {
    transition: transform 0.3s;
}

footer img:hover {
    transform: scale(1.05);
}

/* ========= FORM VALIDATION STYLES ========= */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--danger-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid ~ label.floating-label,
.form-control.is-invalid ~ label.floating-label {
    color: var(--danger-color);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--danger-color);
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* ========= RESPONSIVE STYLES ========= */
@media only screen and (max-width: 991px) {
    footer {
        height: auto;
        position: relative;
        font-size: 12px;
    }
    
    .cdap_inner {
        background-position: center bottom 0px;
    }
    
    .otp_title {
        font-size: 18px;
        line-height: 24px;
    }
    
    .reg_inner {
        padding: 15px;
    }
    
    .cdap_inner {
        padding-top: 100px !important;
    }
}

@media only screen and (max-width: 575px) {
    .reg_inner {
        min-width: 95%;
        padding: 0 10px;
    }
    
    .reg_inner_cont {
        padding: 40px 20px 15px;
    }
    
    .brand_logo_container {
        width: 80px;
        height: 80px;
        top: -40px;
    }
    
    .brand_logo {
        width: 60px;
        height: 60px;
    }
    
    .otp-code li input {
        width: 30px;
        height: 25px;
        padding: 2px;
    }
    
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
    
    .number span {
        font-size: 13px;
        font-weight: bold;
    }
    
    .number .verify_change a {
        font-size: 13px;
        font-weight: bold;
    }
    
    .password_wrong a {
        font-size: 12px;
    }
    
    .customlebel {
        font-size: 11px;
    }
    
    .or_button {
        font-size: 9px;
    }
    
    .my-form-group .form-control {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .my-form-group .floating-label {
        font-size: 15px;
    }
    
    .reg_btn {
        padding: 10px 12px;
        font-size: 15px;
    }
}

@media only screen and (min-width: 320px) and (max-width: 767px) {
    .help_login {
        max-width: 100%;
    }
    
    .con-log-bg {
        padding: 20px 0;
    }
}

@media only screen and (max-height: 700px) {
    .con-log-bg {
        padding: 20px 0;
    }
    
    .reg_inner_cont {
        padding: 30px 20px 15px;
    }
}