/* Think Lists Frontend Styles */

.think-lists-filter-btn {
    display: none !important;
}
.think-lists-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Toolbar and Client Selector */
.think-lists-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.think-lists-client-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.think-lists-client-dropdown {
    padding: 10px 15px;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    font-size: 14px;
    background-color: #fff;
    color: #495057;
    min-width: 150px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.think-lists-client-dropdown:hover,
.think-lists-client-dropdown:focus {
    border-color: #7352c5;
    box-shadow: 0 0 0 2px rgba(115, 82, 197, 0.2);
}

.think-lists-add-client-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #7352c5;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.think-lists-add-client-btn:hover {
    background: #623eba;
    transform: translateY(-1px);
}

.think-lists-actions {
    display: flex;
    align-items: center;
}

.think-lists-reset-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.think-lists-reset-btn:hover {
    background: #e9ecef;
    border-color: #dc3545;
    color: #dc3545;
}

/* Filter Buttons */
.think-lists-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.think-lists-filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.think-lists-filter-btn:hover {
    background: #e9ecef;
    border-color: #7352c5;
    transform: translateY(-1px);
}

.think-lists-filter-btn.active {
    background: #7352c5;
    color: white;
    border-color: #7352c5;
    box-shadow: 0 4px 12px rgba(115, 82, 197, 0.3);
}

/* List Items */
.think-lists-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.think-lists-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.think-lists-item:hover {
    border-color: #7352c5;
    box-shadow: 0 8px 25px rgba(115, 82, 197, 0.1);
    transform: translateY(-2px);
}

.think-lists-item.completed {
    background: #f8f9fa;
    border-color: #28a745;
}

.think-lists-item.completed .think-lists-title {
    text-decoration: line-through;
    color: #6c757d;
}

.think-lists-item.hidden {
    display: none;
}

/* Custom Checkbox */
.think-lists-checkbox-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-top: 3px;
}

.think-lists-checkbox {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.think-lists-custom-checkbox {
    display: block;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.think-lists-custom-checkbox:before {
    content: '';
    position: absolute;
    top: 3px;
    left: 7px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.think-lists-checkbox:checked + .think-lists-custom-checkbox {
    background: #7352c5;
    border-color: #7352c5;
    transform: scale(1.1);
}

.think-lists-checkbox:checked + .think-lists-custom-checkbox:before {
    opacity: 1;
}

.think-lists-custom-checkbox:hover {
    border-color: #7352c5;
    transform: scale(1.05);
}

/* Content */
.think-lists-content {
    flex: 1;
}

.think-lists-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 5px;
    line-height: 1.4;
}

.think-lists-description {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    position: relative;
    color: #6c757d;
}

/* Expandable description styles */
.think-lists-description.collapsed {
    padding-right: 30px;
}

.think-lists-description-preview {
    position: relative;
}

.think-lists-description-full {
    position: relative;
}

.think-lists-expand-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    color: #7352c5;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.think-lists-expand-btn:hover {
    background-color: rgba(115, 82, 197, 0.1);
    transform: scale(1.1);
}

.think-lists-expand-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* Progress Bar */
.think-lists-progress {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.think-lists-progress-text {
    text-align: center;
    font-size: 14px;
    color: #495057;
    margin-bottom: 10px;
    font-weight: 500;
}

.think-lists-progress-text .completed {
    color: #7352c5;
    font-weight: 600;
}

.think-lists-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.think-lists-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7352c5, #9575ff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

/* Error and Empty States */
.think-lists-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.think-lists-empty {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

/* Animation for filtering */
.think-lists-item.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.think-lists-item.fade-in {
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .think-lists-item {
        padding: 15px;
        gap: 12px;
    }
    
    .think-lists-filters {
        gap: 8px;
    }
    
    .think-lists-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .think-lists-title {
        font-size: 15px;
    }
    
    .think-lists-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .think-lists-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .think-lists-checkbox-wrapper {
        margin-top: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .think-lists-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .think-lists-title {
        color: #f7fafc;
    }
    
    .think-lists-description {
        color: #a0aec0;
    }
    
    .think-lists-progress {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .think-lists-progress-text {
        color: #e2e8f0;
    }
}

/* Client Modal */
.think-lists-client-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.think-lists-client-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 25px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
}

.think-lists-client-modal h3 {
    margin-top: 0;
    color: #212529;
    font-size: 24px;
}

.think-lists-client-modal-close {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.think-lists-client-modal-close:hover {
    color: #7352c5;
}

.think-lists-client-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.think-lists-client-name {
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    font-size: 16px;
}

.think-lists-client-name:focus {
    outline: none;
    border-color: #7352c5;
    box-shadow: 0 0 0 2px rgba(115, 82, 197, 0.2);
}

.think-lists-client-save {
    background: #7352c5;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.think-lists-client-save:hover {
    background: #623eba;
}

.think-lists-add-client-btn {
    background-color: #7352c5;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.think-lists-add-client-btn:hover {
    background-color: #5e3da8;
}

.think-lists-delete-client-btn {
    background-color: #f05757;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.think-lists-delete-client-btn:hover {
    background-color: #d93c3c;
}

.trash-icon::before {
    content: '\f182'; /* WordPress dashicons trash icon */
    font-family: dashicons;
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

/* Responsive Media Queries for Client Features */
@media (max-width: 768px) {
    .think-lists-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .think-lists-client-selector {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .think-lists-client-dropdown {
        flex: 1;
    }
    
    .think-lists-client-modal-content {
        width: 90%;
        margin: 30% auto;
    }
}
