/********** Template CSS **********/

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Heading ***/
h1,
h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
h4,
.fw-semi-bold {
    font-weight: 600 !important;
}

h5,
h6,
.fw-medium {
    font-weight: 500 !important;
}


/*** Button ***/
.btn {
    transition: .5s;
}

.btn:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}

.btn.btn-primary {
    color: var(--bs-light);
}

.btn.btn-light {
    color: var(--bs-primary);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Navbar ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f067";
    font-family: "Font Awesome 5 Free";
    font-size: 10px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    position: relative;
    margin-right: 25px;
    padding: 35px 0;
    font-weight: 500;
    color: var(--bs-light);
    outline: none;
    transition: .5s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-light);
}

.sticky-top.navbar .navbar-nav .nav-link {
    padding: 20px 0;
    color: var(--bs-dark);
}

.sticky-top.navbar .navbar-nav .nav-link:hover,
.sticky-top.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary);
}

.navbar .navbar-brand h1 {
    color: #FFFFFF;
}

.navbar .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.sticky-top.navbar .navbar-brand img {
    max-height: 45px;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar {
        position: relative;
        background: #FFFFFF;
    }

    .navbar .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid #DDDDDD;
    }

    .navbar .navbar-nav .nav-link,
    .sticky-top.navbar .navbar-nav .nav-link {
        padding: 10px 0;
        margin-left: 0;
        color: var(--bs-dark);
    }

    .navbar .navbar-nav .nav-link:hover,
    .navbar .navbar-nav .nav-link.active {
        color: var(--bs-primary);
    }

    .navbar .navbar-brand h1 {
        color: var(--bs-primary);
    }

    .navbar-light .navbar-brand img {
        max-height: 45px;
    }
}

@media (min-width: 992px) {
    .navbar {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 999;
    }
    
    .sticky-top.navbar {
        position: fixed;
        background: #FFFFFF;
    }

    .sticky-top.navbar .navbar-brand h1 {
        color: var(--bs-primary);
    }

    .navbar .navbar-nav .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .navbar-nav .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }

    .sticky-top.navbar .btn {
        color: var(--bs-light);
        background: var(--bs-primary);
        border-color: var(--bs-primary);
    }
}


/*** Hero Header ***/
.hero-header {
    padding: 12rem 0;
    background: url(../img/bg-bottom.png) center bottom no-repeat;
    background-size: contain;
}

@media (max-width: 991.98px) {
    .hero-header {
        padding: 6rem 0 9rem 0;
    }
}


/*** Feature ***/
.feature-item,
.advanced-feature-item {
    height: 100%;
    transition: .5s;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.feature-item:hover {
    margin-top: -15px;
}

.advanced-feature-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.advanced-feature-item * {
    transition: .5s;
}

.advanced-feature-item:hover {
    background: var(--bs-primary);
}

.advanced-feature-item:hover * {
    color: #FFFFFF !important;
}


/*** Process ***/
.process {
    padding: 0;
    list-style: none;
}

.process li {
    position: relative;
    display: flex;
    padding-bottom: 25px;
}

.process li::after {
    position: absolute;
    content: "";
    width: 1px;
    height: 100%;
    top: 0;
    left: 20px;
    background: var(--bs-primary);
}

.process li:last-child {
    padding-bottom: 0;
}

.process li:last-child:after {
    display: none;
}

.process li span {
    position: relative;
    width: 40px;
    height: 40px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #FFFFFF;
    background: var(--bs-primary);
    border-radius: 40px;
    z-index: 1;
}

.process li p {
    margin: 0;
}


/*** Price ***/
.price-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .5s;
}

.price-item:hover {
    margin-top: -10px;
}


/*** Testimonial ***/
.testimonial-carousel .testimonial-item {
    padding: 0 30px 30px 30px;
}

.testimonial-carousel .owl-nav {
    display: flex;
    justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    background: var(--bs-light);
    border-radius: 60px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: #FFFFFF;
    background: var(--bs-primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}


/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-light);
    border: 1px solid #858585;
    border-radius: 40px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--bs-primary);
    border-color: var(--bs-light);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: var(--bs-light);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
    color: var(--bs-light);
}

.footer .copyright {
    padding: 25px 0;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--bs-light);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.footer .copyright a:hover,
.footer .footer-menu a:hover {
    color: var(--bs-secondary);
}


/*** Signup Page ***/
.role-option .btn-outline-primary {
    border: 2px solid #dee2e6;
    color: #6c757d;
    transition: all 0.3s ease;
}

.role-option .btn-check:checked + .btn-outline-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #FFFFFF;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.role-option .btn-outline-primary:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.role-option .btn-check:checked + .btn-outline-primary:hover {
    color: #FFFFFF;
}

.role-option i {
    transition: transform 0.3s ease;
}

.role-option .btn-outline-primary:hover i {
    transform: scale(1.1);
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.15);
}

/* Password Toggle Button - Inside Input */
.password-input-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-icon:hover {
    color: var(--bs-primary);
}

.password-toggle-icon i {
    font-size: 1rem;
    pointer-events: none;
}

.password-input-wrapper .form-control {
    padding-right: 45px !important;
}

.password-input-wrapper .form-floating > label {
    padding-right: 45px;
}

/* Validation Feedback Styling */
.invalid-feedback {
    display: none;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-control.is-invalid {
    border-color: #dc3545;
    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);
}

.form-control.is-valid {
    border-color: #198754;
    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 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);
}

.password-input-wrapper .form-control.is-invalid,
.password-input-wrapper .form-control.is-valid {
    padding-right: 70px !important;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Password Strength Indicator */
#passwordStrength {
    margin-top: 0.25rem;
    font-weight: 500;
}

#passwordStrength small {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

#passwordStrength .text-danger {
    background-color: rgba(220, 53, 69, 0.1);
}

#passwordStrength .text-warning {
    background-color: rgba(255, 193, 7, 0.1);
}

#passwordStrength .text-success {
    background-color: rgba(25, 135, 84, 0.1);
}

/* Phone Format Hint */
#phoneHint {
    display: block;
    margin-top: 0.25rem;
}

/* Alert Animations */
.alert {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Control Validation States */
.form-control:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15);
}

.form-control:valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .password-toggle-icon {
        right: 10px;
        padding: 6px;
    }
    
    .password-input-wrapper .form-control {
        padding-right: 40px !important;
    }
    
    .password-toggle-icon i {
        font-size: 0.9rem;
    }
}


/*** Profile Page ***/
.password-input-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s;
    z-index: 10;
}

.password-toggle-icon:hover {
    color: #0d6efd;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}


/*** Updated Button Colors - Matching Homepage & Writer Theme ***/
.btn-primary {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

.btn-success {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.btn-success:hover {
    background-color: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

.btn-info {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.btn-info:hover {
    background-color: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

.btn-warning {
    background-color: #ff6907 !important;
    border-color: #ff6907 !important;
    color: #fff !important;
}

.btn-warning:hover {
    background-color: #e55a00 !important;
    border-color: #e55a00 !important;
    color: #fff !important;
}

/* Reduce border radius for all buttons */
.btn {
    border-radius: 0.5rem !important;
}

.btn-lg {
    border-radius: 0.75rem !important;
}

.btn-sm {
    border-radius: 0.35rem !important;
}

/* Override rounded-pill where needed */
.rounded-pill.btn {
    border-radius: 0.75rem !important;
}

/* Badge colors */
.badge-primary,
.bg-primary.badge {
    background-color: #dc3545 !important;
}

.badge-success,
.bg-success.badge {
    background-color: #dc3545 !important;
}

.badge-info,
.bg-info.badge {
    background-color: #333 !important;
}

.badge-warning,
.bg-warning.badge {
    background-color: #dc3545 !important;
}

/* Text colors */
.text-primary {
    color: #dc3545 !important;
}

.text-success {
    color: #dc3545 !important;
}

.text-info {
    color: #ff6907 !important;
}

/* Link colors */
a.text-primary:hover {
    color: #333 !important;
}

/* Border colors */
.border-primary {
    border-color: #dc3545 !important;
}

.border-success {
    border-color: #dc3545 !important;
}


/*** Notification Badge Fix - All User Types ***/
/* Fix notification badge positioning */
.dropdown > a {
    position: relative;
    display: inline-block;
}

.dropdown > a .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 2px 5px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 14px;
    border-radius: 10px;
    background-color: #dc3545;
    color: white;
    border: 2px solid white;
}

/* Notification dropdown menu styling */
.dropdown-menu.notification-dropdown {
    min-width: 320px;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
}

.notification-dropdown .dropdown-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #333;
}

.notification-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    white-space: normal;
    transition: background-color 0.2s;
}

.notification-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.notification-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.notification-dropdown .dropdown-item.unread {
    background-color: #fff8f0;
}

.notification-dropdown .dropdown-footer {
    text-align: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.notification-dropdown .dropdown-footer a {
    color: #dc3545;
    font-weight: 600;
    text-decoration: none;
}

.notification-dropdown .dropdown-footer a:hover {
    color: #333;
    text-decoration: underline;
}

/* Empty notification state */
.notification-dropdown .text-center.text-muted {
    padding: 2rem 1rem;
}

/* Mobile notification fixes */
@media (max-width: 767px) {
    .dropdown-menu.notification-dropdown {
        position: fixed !important;
        top: 60px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: auto;
        max-width: none;
        width: calc(100% - 20px);
        transform: none !important;
    }
    
    .dropdown > a .badge {
        top: -3px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
        line-height: 12px;
        padding: 2px 4px;
    }
}
