/* Saved CVs Selection Component Styles */

.saved-cvs-selection-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.js-select-saved-cv-btn {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    
   
}



.js-select-saved-cv-btn.disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.js-select-saved-cv-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}



.js-select-saved-cv-btn .btn-txt {
    flex: 1;
    text-align: left;
    font-weight: 500;
    
}

.js-select-saved-cv-btn .btn-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.js-saved-cvs-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow: hidden;
}

.js-saved-cvs-dropdown.show {
    display: block;
}

.saved-cvs-list {
    max-height: 200px;
    overflow-y: auto;
}

.saved-cv-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.saved-cv-item:hover {
    background: #f8f9ff;
}

.saved-cv-item.selected {
    background: #e8f0fe;
    border-left: 3px solid #6c63ff;
}

.saved-cv-item.hidden {
    display: none;
}

.saved-cv-item .cv-radio {
    margin-right: 12px;
}

.saved-cv-item .cv-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.saved-cv-item .cv-info {
    flex: 1;
}

.saved-cv-item .cv-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.saved-cv-item .cv-meta {
    font-size: 12px;
    color: #666;
}

.saved-cv-item .cv-actions {
    margin-left: 12px;
}

.saved-cv-item .cv-preview-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    transition: all 0.2s ease;
}

.saved-cv-item .cv-preview-link:hover {
    background: #6c63ff;
    color: #fff;
}

.saved-cvs-scroll-info {
    padding: 8px 16px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.saved-cvs-scroll-info small {
    color: #666;
    font-size: 11px;
}

.saved-cvs-actions {
 padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    position: sticky;
    z-index: 100000;
    bottom: 0;
    background: #fff;
}

.saved-cvs-actions .btn {
    flex: 1;
}

.saved-cvs-empty {
    padding: 40px 20px;
    text-align: center;
}

.saved-cvs-empty .empty-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

.saved-cvs-empty .empty-message {
    color: #666;
    margin-bottom: 20px;
}

/* Disabled state for other CV options */
.form-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.form-group.disabled label::after {
    content: " (Disabled)";
    color: #999;
    font-size: 12px;
}

/* Loading spinner */
.js-select-saved-cv-btn.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6c63ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .saved-cvs-list {
        max-height: 300px;
    }
    
    .saved-cv-item {
        padding: 10px 12px;
    }
    
    .saved-cv-item .cv-name {
        font-size: 14px;
    }
    
    .saved-cvs-actions {
        flex-direction: column;
    }
}
