/* Custom styles for Role-Specific Lead Manager */
/* Improvement 2.1: Verified no unsafe inline styles or properties (e.g., expression, javascript) - June 18, 2025 */
/* Improvement 3.1: Added accessibility-focused styles for notification buttons - June 22, 2025 */

.logo-plate {
    width: 140px;
    padding: 18px;
    margin: 0 auto 20px;
    border-radius: 50%;

    /* Subtle gold-ish gradient plate */
    background: linear-gradient(145deg, 
                #e74c5d 0%, 
                #05014f 60%, 
                #03071b 100%);

    /* Soft floating effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.rslm-login-logo {
    max-width: 100%;
    display: block;
}

/* General */
body {
    background-color: #f8f9fa;
    transition: all 0.5s;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 45px;
    font-size: 1rem;
}

.select2-results__option {
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
}

.select2-results {
    max-height: 350px;
    overflow-y: scroll;
    padding-block: 10px;
}

.form-select {
    padding-block: 0.625rem !important;
    
}

.select2-container .select2-selection--single .select2-selection__rendered {
    /* border: inherit !important; */
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: 5px;
    padding: 10px;
}

.card {
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}


.notification-go-link {
    padding: 0.5rem !important;
}

.tooltip-arrow::before {
    border-top-color: #ddd !important;
}

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 3px;
}

.dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item {
    white-space: normal;
    padding: 6px 12px;
    /* Optional: tighter spacing */
}

.lead-dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    position: absolute;
    z-index: 2000;
}

.dropdown {
    overflow: visible !important;
    position: relative;
}

.dropdown-menu {
    position: absolute;
    z-index: 2000;
    /* Make sure it floats above */
}

.custom-tooltip {
    border: 1px solid rgba(0, 0, 0, 0.175);
    font-size: 14px;
    padding: 0.5rem;
    --bs-tooltip-bg: white;
    --bs-tooltip-color: #212529;
    border-radius: 0.5rem;
}

#editQuestionnaireModal .modal-content {
    border-radius: 8px;
    border: 3px solid #007bff;
    /* background-color: #f1f1f1; */
    padding: 15px;
}

#editQuestionnaireModal .form-control {
    margin-bottom: 10px;
}

#saleDetailsModal .modal-content {
    border-radius: 8px;
    padding: 15px;
}

.alert-container,
#global-alert-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1050;
    width: 300px;
}

.new-notification {
    background-color: #e6f3ff;
}

#notifications-tab .badge {
    display: inline-block !important;
    min-width: 20px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background-color: #dc3545;
    border-radius: 10px;
    margin-left: 5px;
}

/* RSLM Styles */
.dropdown-menu.show {
    display: block !important;
    z-index: 1000;
}

/* Notification Buttons */
.mark-read,
#refresh-notifications {
    color: #6c757d;
    /* Bootstrap btn-outline-secondary text color */
    background-color: #fff;
    border: 1px solid #6c757d;
    transition: all 0.2s ease;
}

.mark-read:hover,
#refresh-notifications:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.mark-read:focus,
#refresh-notifications:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.mark-read:active,
#refresh-notifications:active {
    background-color: #5c636a;
    border-color: #5c636a;
}

/* Ensure high contrast for accessibility */
.btn-outline-secondary {
    color: #6c757d;
    /* Contrast ratio ~4.6:1 against #fff background */
}

.btn-outline-secondary:hover {
    color: #fff;
    /* Contrast ratio ~4.7:1 against #6c757d background */
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Login Page */
.rslm-login-body {
    background: linear-gradient(135deg, #007bff, #00c4b4);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.rslm-login-container {
    width: 100%;
    max-width: 400px;
    padding: 15px;
}

.rslm-login-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 30px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.rslm-login-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
}

.rslm-login-form .form-control {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease;
}

.rslm-login-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.rslm-login-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: #007bff;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.rslm-login-btn:hover {
    background: #0056b3;
}

.rslm-login-btn:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

.rslm-role-selection {
    margin-bottom: 20px;
}

.rslm-role-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.rslm-role-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.rslm-role-btn:hover {
    transform: translateY(-2px);
}

.rslm-login-links {
    margin-top: 15px;
    font-size: 0.9rem;
}

.rslm-login-links a {
    color: #007bff;
    text-decoration: none;
}

.rslm-login-links a:hover {
    text-decoration: underline;
}

.alert {
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboards */
.rslm-nav-tabs .nav-link,
.nav-tabs .nav-link {
    color: #333;
    font-weight: 500;
}

.rslm-nav-tabs .nav-link.active,
.nav-tabs .nav-link.active {
    background-color: #fff;
    border-bottom: 2px solid #007bff;
}

.rslm-tab-content,
.tab-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.rslm-table-responsive,
.table-responsive {
    overflow-x: auto;
}

.form-control {
    border-radius: 5px;
    padding: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 5px;
}

/* Timeline (verify usage for 2.4) */
.rslm-timeline,
.timeline {
    position: relative;
    padding-left: 30px;
}

.rslm-timeline-item,
.timeline-item {
    position: relative;
}

.rslm-timeline-item:last-child::before,
.timeline-item:last-child::before {
    content: none;
}

.rslm-timeline-badge,
.timeline-badge {
    position: absolute;
    left: -30px;
    top: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.rslm-timeline-item::before,
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
    z-index: -1;
}

.rslm-timeline-content,
.timeline-content {
    margin-left: 20px;
}

/* Responsive Design */
@media (max-width: 576px) {

    .rslm-login-card,
    .card,
    .tab-content {
        padding: 10px;
    }

    .rslm-login-header h2 {
        font-size: 1.5rem;
    }

    .rslm-role-btn {
        min-width: 80px;
        font-size: 0.8rem;
    }

    .nav-tabs .nav-link {
        font-size: 14px;
    }

    #global-alert-container {
        width: 100%;
        padding: 10px;
        right: 0;
    }
}

@media (max-width: 768px) {
    .rslm-login-container {
        padding: 10px;
    }
}