/* 
 * Save Lead Functionality Styles
 * Based on design requirements
 */

.btn-save-lead {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
    transition: all 0.2s ease;
}

.btn-save-lead:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-save-lead.bookmarked {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.save-lead-container {
    padding: 0;
    width: 100%;
}

.report-lead-link {
    display: block;
    text-align: right;
    color: #C3C3C3;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s;
    padding: 8px 12px 4px;
}

.report-lead-link:hover {
    color: #a0a0a0;
    text-decoration: underline;
}

/* Dropdown Tooltip */
.save-lead-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: 340px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    margin-bottom: 12px;
}

.search-lists-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F2F2F4;
    padding: 8px 12px;
    border-radius: 8px;
}

.search-lists-wrapper svg {
    color: #929292;
}

.search-lists-input {
    border: none;
    background: transparent;
    font-size: 16px;
    color: #111827;
    width: 100%;
    outline: none;
}

.search-lists-input::placeholder {
    color: #929292;
}

/* Lists Area */
.lists-container {
    max-height: 160px; /* Force scroll after ~3-4 items */
    overflow-y: auto;
    margin-bottom: 12px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.lead-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 6px;
}

.lead-list-item:hover {
    background: #f9fafb;
}

.list-checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lead-list-item.selected .list-checkbox {
    background: #2563eb;
    border-color: #2563eb;
}

.list-checkbox::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}

.lead-list-item.selected .list-checkbox::after {
    display: block;
}

.list-name {
    font-size: 0.9rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.list-item-loading {
    padding: 10px;
    color: #9ca3af;
    font-size: 0.85rem;
    text-align: center;
}

/* Footer & Create List */
.dropdown-footer {
    border-top: 1px solid #d1d5db;
    padding-top: 10px;
}

.create-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.create-list-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-end;
    padding: 5px 10px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}

.create-list-toggle-btn:hover {
    background: #2b52c8;
}

.create-list-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.create-list-input:focus {
    border-color: #2563eb;
}

.create-list-error {
    display: block;
    font-size: 0.75rem;
    color: #dc2626 !important;
    min-height: 1.2em;
    opacity: 1;
    transition: opacity 1.8s ease;
}

.create-list-error.is-fading {
    opacity: 0;
}


/* Remove blue focus outlines/borders when clicked — scoped to interactive elements only */
button:focus,
button:active,
input:focus,
input:active,
a:focus,
a:active {
    outline: none !important;
}

/* Prevent Bootstrap from adding a focus box-shadow to the save-lead button */
.btn-save-lead:focus,
.btn-save-lead:active {
    box-shadow: none !important;
}

/* Job list card: inline wrapper so button sits next to company name */
.loj-card-company .save-lead-wrapper {
    display: inline-block;
    position: relative;
    vertical-align: top;
    margin-top: -2px;
    margin-left: 5px;
}

/* Job list card: visual-only bookmark indicator — not interactive */
.loj-save-lead-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #9ca3af;
    border-radius: 20px;
    padding: 1px 4px;
    font-size: 0.52rem;
    font-weight: 500;
    gap: 4px;
    pointer-events: none;
    cursor: default;
}

.loj-save-lead-btn .btn-text {
    display: none;
}

.loj-save-lead-btn .bookmark-icon svg {
    width: 10px;
    height: 10px;
}

.loj-save-lead-btn.bookmarked {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.loj-save-lead-btn.bookmarked svg {
    fill: currentColor;
    stroke: none;
}

/* Saved card visual treatment */
.loj-job-card.loj-card-saved {
    border: 1px solid #9ebbf2;
    background: #efefef;
}

.loj-job-card.loj-card-saved .loj-card-company,
.loj-job-card.loj-card-saved .loj-card-time,
.loj-job-card.loj-card-saved .loj-location,
.loj-job-card.loj-card-saved .loj-card-title {
    color: #3663e4;
}

.loj-job-card.loj-card-saved .loj-location svg {
    stroke: #3663e4;
    color: #3663e4;
}

/* Job list card: dropdown position */
.loj-card-company .save-lead-dropdown {
    left: 0;
    right: auto;
    top: calc(100% + 6px);
    width: 240px;
}

/* Bookmarks page card: save-lead button + dropdown */
.wfh-bk-save-wrap {
    flex-shrink: 0;
}

.wfh-bk-save-wrap .save-lead-dropdown {
    right: 0;
    left: auto;
    top: calc(100% + 6px);
    width: 250px;
}

@media (max-width: 768px) {
    .create-list-toggle-btn {
        padding: 8px 13px;
    }
}

