/* Course Advisor Enhanced CSS v2.0 */
/* File: /wp-content/plugins/course-advisor/assets/css/style.css */

/* Original styles (keep all existing styles) */
#course-advisor-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Cart Icon */
.ca-cart-icon {
    position: fixed;
    top: 100px;
    left: 20px;
    background: #007cba;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Enhanced Cart Popup */
.ca-cart-popup {
    position: fixed;
    top: 100px;
    left: 80px;
    width: 400px;
    max-height: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    z-index: 9998;
    display: none;
    overflow: hidden;
}

.ca-cart-header {
    padding: 15px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ca-cart-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ca-share-cart {
    background: #4267B2;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.ca-share-cart:hover {
    background: #365899;
}

/* Selection Mode */
.ca-selection-toolbar {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ca-cart-items.selection-mode .ca-cart-item {
    cursor: pointer;
    user-select: none;
}

.ca-cart-items.selection-mode .ca-cart-item:hover {
    background: #e3f2fd;
}

.ca-cart-items.selection-mode .ca-cart-item.selected {
    background: #bbdefb;
    border-left: 3px solid #2196f3;
}

.ca-cart-item-checkbox {
    margin-right: 10px;
}

/* Share Panel */
.ca-share-panel {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

.ca-share-panel h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.ca-share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.ca-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ca-share-facebook {
    background: #4267B2;
}

.ca-share-facebook:hover {
    background: #365899;
}

.ca-share-messenger {
    background: #0084ff;
}

.ca-share-messenger:hover {
    background: #0066cc;
}

.ca-share-zalo {
    background: #0068FF;
}

.ca-share-zalo:hover {
    background: #0052cc;
}

.ca-share-whatsapp {
    background: #25D366;
}

.ca-share-whatsapp:hover {
    background: #1ea952;
}

.ca-share-email {
    background: #EA4335;
}

.ca-share-email:hover {
    background: #d33b2c;
}

.ca-share-copy {
    background: #6c757d;
}

.ca-share-copy:hover {
    background: #5a6268;
}

/* Share Link Container */
.ca-share-link-container {
    position: relative;
    margin-top: 10px;
}

.ca-share-link {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.ca-copy-success {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    display: none;
}

/* Shared Notification */
.ca-shared-notification {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ca-shared-notification p {
    margin: 0;
    color: #856404;
}

#ca-load-shared {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
}

#ca-load-shared:hover {
    background: #e0a800;
}

/* Modal */
.ca-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.ca-modal-content {
    background: white;
    margin: 15% auto;
    padding: 30px;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.ca-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.ca-modal-close:hover {
    color: #333;
}

/* Admin Styles Enhancement */
/* File: /wp-content/plugins/course-advisor/assets/css/admin-style.css */

/* Complex Conditions Builder */
.ca-conditions-builder {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.ca-conditions-builder h3 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.ca-main-operator {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ca-main-operator label {
    font-weight: 600;
    margin-right: 10px;
}

.ca-main-operator select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Condition Groups */
.ca-condition-groups {
    margin-bottom: 20px;
}

.ca-condition-group {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.ca-condition-group:hover {
    border-color: #007cba;
}

.ca-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ca-group-header h4 {
    margin: 0;
    color: #23282d;
    font-size: 16px;
}

.ca-remove-group {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
}

.ca-remove-group:hover {
    background: #c82333 !important;
}

.ca-group-operator {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.ca-group-operator label {
    font-weight: 500;
    margin-right: 10px;
}

/* Individual Conditions */
.ca-conditions-list {
    margin-bottom: 15px;
}

.ca-condition {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.ca-condition select.condition-type {
    width: 200px;
}

.ca-condition select.condition-values {
    flex: 1;
    min-height: 60px;
}

.ca-remove-condition {
    background: #dc3545 !important;
    color: white !important;
}

.ca-add-condition {
    background: #28a745 !important;
    color: white !important;
}

/* Priority Field */
#priority {
    width: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .ca-cart-popup {
        left: 20px;
        right: 20px;
        width: auto;
    }
    
    .ca-share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ca-condition {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ca-condition select.condition-type {
        width: 100%;
    }
}

/* Loading and Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ca-suggestion-item {
    animation: slideIn 0.3s ease;
}

/* Tooltip for long press */
.ca-cart-items:not(.selection-mode) .ca-cart-item::after {
    content: "Nhấn giữ để chọn nhiều";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ca-cart-items:not(.selection-mode) .ca-cart-item:first-child:hover::after {
    opacity: 1;
}