/* Reading Lists Modal - Basic Structure & Functionality */

/* Modal trigger button in post meta */
.reading-lists-trigger {
    display: inline-block;
    max-height: 32px;
}

.modal-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.modal-trigger-btn .reading-list-icon {
    width: 30px;
    height: 30px;
    opacity: 1;
}

.modal-trigger-btn:hover {
    background: transparent;
}

.modal-trigger-btn:hover .reading-list-icon {
    opacity: 1;
}

.modal-trigger-btn.is-saved {
    color: #0d6efd;
    border-color: #0d6efd;
}

.saved-status {
    display: none;
}

.saved-list-info .list-name {
    font-weight: 600;
    color: #0d6efd;
}

/* Bootstrap Modal Customizations for Reading Lists */
#readingListsModal .modal-dialog {
    max-width: 500px;
}

#readingListsModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Loading state */
#readingListsModal .modal-loading {
    padding: 2rem;
}

/* Custom Spinner */
.custom-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
}

.custom-spinner .spinner-icon {
    width: 100%;
    height: 100%;
    /* The animation is already built into the SVG, so we don't need additional CSS animation */
}

/* Login Prompt */
#readingListsModal .login-prompt {
    text-align: center;
    padding: 2rem 1rem;
}

#readingListsModal .login-prompt h3 {
    margin-bottom: 1rem;
    color: #212529;
}

#readingListsModal .login-prompt p {
    margin-bottom: 1.5rem;
    color: #6c757d;
    line-height: 1.5;
}

#readingListsModal .login-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Error State */
#readingListsModal .modal-error {
    text-align: center;
    padding: 2rem 1rem;
}

#readingListsModal .modal-error p {
    margin-bottom: 1rem;
    color: #dc3545;
}

/* Create New List Form */
#readingListsModal .create-list-section {
    width: 100%;
}

#readingListsModal .create-list-form {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

#readingListsModal .new-list-name {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#readingListsModal .new-list-name:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#readingListsModal .new-list-name:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

#readingListsModal .create-list-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

#readingListsModal .save-new-list-btn,
#readingListsModal .cancel-new-list-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
}

#readingListsModal .save-new-list-btn:disabled,
#readingListsModal .cancel-new-list-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Responsive Design */
@media (max-width: 768px) {
    #readingListsModal .login-actions {
        flex-direction: column;
    }
    
    #readingListsModal .login-actions .btn {
        width: 100%;
    }
    
    #readingListsModal .create-list-actions {
        flex-direction: column-reverse;
    }
    
    #readingListsModal .create-list-actions .btn {
        width: 100%;
    }
}

