/**
 * ===========================================
 * Reusable UI Components - AppointGenius BO
 * ===========================================
 *
 * This file contains reusable component styles that can be shared
 * across different parts of the application.
 */

/* ===========================================
   BADGES - Global Styling
   =========================================== */

/* Center align all badge content (icons + text) */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    vertical-align: middle;
}

.badge i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===========================================
   INFO BOXES & ALERTS
   =========================================== */

/* Generic Info Box - can be colored with variants */
.info-box {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.info-box i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

/* Info Box Variants */
.info-box.info-primary {
    background: rgba(32, 201, 151, 0.1);
    border-color: #20c997;
    color: #0a2b22;
}

.info-box.info-primary i {
    color: #20c997;
}

.info-box.info-blue {
    background: rgba(13, 110, 253, 0.1);
    border-color: #0d6efd;
    color: #084298;
}

.info-box.info-blue i {
    color: #0d6efd;
}

.info-box.info-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #856404;
}

.info-box.info-warning i {
    color: #ffc107;
}

.info-box.info-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #721c24;
}

.info-box.info-danger i {
    color: #dc3545;
}

/* ===========================================
   BADGES
   =========================================== */

.badge-premium {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ===========================================
   AVATAR
   =========================================== */

.avatar {
    border-radius: 50%;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar i {
    color: #6c757d;
}

/* Avatar Sizes */
.avatar-xs {
    width: 32px;
    height: 32px;
}

.avatar-xs i {
    font-size: 0.9rem;
}

.avatar-sm {
    width: 40px;
    height: 40px;
}

.avatar-sm i {
    font-size: 1rem;
}

.avatar-md {
    width: 48px;
    height: 48px;
}

.avatar-md i {
    font-size: 1.2rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-lg i {
    font-size: 1.5rem;
}

/* ===========================================
   SELECTABLE ITEMS (with checkbox/selection)
   =========================================== */

.selectable-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selectable-item:hover {
    border-color: var(--color-primary, #20c997);
    box-shadow: 0 4px 12px rgba(32, 201, 151, 0.15);
    transform: translateY(-2px);
}

.selectable-item.selected {
    border-color: var(--color-primary, #20c997);
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.05) 0%, rgba(40, 167, 69, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(32, 201, 151, 0.2);
}

.selectable-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.selectable-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.selectable-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
}

.selectable-item-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ===========================================
   CUSTOM CHECKBOX
   =========================================== */

.custom-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.custom-checkbox input[type="checkbox"]:hover {
    border-color: var(--color-primary, #20c997);
}

.custom-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    border-color: var(--color-primary, #20c997);
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
}

/* ===========================================
   SCROLLABLE LIST
   =========================================== */

.scrollable-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.scrollable-list::-webkit-scrollbar {
    width: 6px;
}

.scrollable-list::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 10px;
}

.scrollable-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===========================================
   EMPTY STATE
   =========================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.empty-state p,
.empty-state h6 {
    margin: 0;
    font-size: 0.95rem;
}

.empty-state h6 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* ===========================================
   CHIPS (Tags/Labels)
   =========================================== */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.chip-primary {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.1) 0%, rgba(40, 167, 69, 0.1) 100%);
    border: 1px solid rgba(32, 201, 151, 0.3);
    color: #0a2b22;
}

.chip-primary:hover {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.15) 0%, rgba(40, 167, 69, 0.15) 100%);
    border-color: rgba(32, 201, 151, 0.5);
    transform: translateY(-1px);
}

.chip-secondary {
    background: rgba(108, 117, 125, 0.1);
    border: 1px solid rgba(108, 117, 125, 0.3);
    color: #495057;
}

.chip-removable .chip-remove-btn {
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.chip-removable .chip-remove-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.15);
}

.chip-removable .chip-remove-btn i {
    font-size: 0.6rem;
}

/* ===========================================
   ICON BUTTONS
   =========================================== */

.btn-icon-sm {
    width: 28px;
    height: 28px;
    border: 2px dashed;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-icon-sm i {
    font-size: 0.8rem;
}

.btn-icon-sm.btn-add {
    border-color: var(--color-primary, #20c997);
    background: rgba(32, 201, 151, 0.1);
    color: var(--color-primary, #20c997);
}

.btn-icon-sm.btn-add:hover {
    background: var(--color-primary, #20c997);
    color: white;
    border-color: var(--color-primary, #20c997);
    transform: scale(1.1);
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 576px) {
    .selectable-item {
        padding: 0.875rem;
    }

    .avatar-md {
        width: 40px;
        height: 40px;
    }

    .avatar-md i {
        font-size: 1rem;
    }

    .selectable-item-info {
        gap: 0.75rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 2.5rem;
    }
}
