/* =============================================================================
   LaraMedic Icon System
   ============================================================================= */

/* Base icon styling */
.lm-icon {
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    flex-shrink: 0;
}

/* Default size */
.lm-icon {
    width: 1.5em;
    height: 1.5em;
}

/* Size variants */
.lm-icon-xs { width: 0.875em; height: 0.875em; }
.lm-icon-sm { width: 1.125em; height: 1.125em; }
.lm-icon-md { width: 1.5em; height: 1.5em; }
.lm-icon-lg { width: 2em; height: 2em; }
.lm-icon-xl { width: 3em; height: 3em; }
.lm-icon-2x { width: 2em; height: 2em; }
.lm-icon-3x { width: 3em; height: 3em; }
.lm-icon-4x { width: 4em; height: 4em; }
.lm-icon-5x { width: 5em; height: 5em; }

/* =============================================================================
   Icon Picker (Admin / Pagebuilder)
   ============================================================================= */

.icon-picker-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-picker-modal {
    background: #fff;
    border-radius: 12px;
    width: 680px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.icon-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.icon-picker-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.icon-picker-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    line-height: 1;
}

.icon-picker-close:hover {
    color: #1f2937;
}

.icon-picker-search {
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.icon-picker-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

.icon-picker-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.icon-picker-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
}

.icon-picker-tab {
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}

.icon-picker-tab:hover {
    color: #1f2937;
}

.icon-picker-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.icon-picker-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.icon-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    background: #f9fafb;
}

.icon-picker-item:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.icon-picker-item.selected {
    background: #eff6ff;
    border-color: #2563eb;
}

.icon-picker-item svg {
    width: 32px;
    height: 32px;
    fill: #374151;
}

.icon-picker-item:hover svg {
    fill: #2563eb;
}

.icon-picker-item.selected svg {
    fill: #2563eb;
}

.icon-picker-item-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

/* Selected icon preview in settings panel */
.icon-picker-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-picker-preview-icon {
    width: 48px;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.icon-picker-preview-icon svg {
    width: 28px;
    height: 28px;
    fill: #374151;
}

.icon-picker-preview-empty {
    color: #9ca3af;
    font-size: 0.85rem;
    font-style: italic;
}

.icon-picker-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s;
}

.icon-picker-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.icon-picker-remove {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

.icon-picker-remove:hover {
    background: #fee2e2;
}