/* Icon Picker Component Styles */

.icon-picker-container {
    position: relative;
    width: 100%;
}

.icon-picker-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px;
    background: white;
}

.icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 20px;
    color: #2c5f2d;
    flex-shrink: 0;
}

.icon-input {
    flex: 1;
}

.icon-input .e-input-group {
    border: none !important;
}

.icon-picker-btn {
    flex-shrink: 0;
}

.icon-picker-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.icon-picker-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.icon-picker-tabs button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.icon-picker-tabs button:hover {
    background: #e2e8f0;
}

.icon-picker-tabs button.active {
    background: white;
    color: #2c5f2d;
    border-bottom: 2px solid #97bc62;
}

.icon-picker-content {
    padding: 16px;
    overflow-y: auto;
    max-height: 420px;
}

.icon-search-box {
    margin-bottom: 16px;
}

.icon-search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
}

.icon-search-box input:focus {
    outline: none;
    border-color: #97bc62;
    box-shadow: 0 0 0 3px rgba(151, 188, 98, 0.1);
}

.icon-search-box small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    min-height: 80px;
}

.icon-item:hover {
    border-color: #97bc62;
    background: #f0f7e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.icon-item.selected {
    border-color: #2c5f2d;
    background: #e8f5e9;
    box-shadow: 0 0 0 2px rgba(44, 95, 45, 0.2);
}

.icon-item i {
    font-size: 24px;
    color: #2c5f2d;
    margin-bottom: 8px;
}

.icon-item .icon-name {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-item.selected .icon-name {
    color: #2c5f2d;
    font-weight: 600;
}

.custom-icon-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-icon-input label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.custom-icon-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.custom-icon-input input:focus {
    outline: none;
    border-color: #97bc62;
    box-shadow: 0 0 0 3px rgba(151, 188, 98, 0.1);
}

.custom-icon-input small {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.custom-icon-input code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #2c5f2d;
}

.icon-preview-large {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: #f8f9fa;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    margin-top: 8px;
}

.icon-preview-large i {
    font-size: 48px;
    color: #2c5f2d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .icon-item {
        min-height: 70px;
        padding: 8px 4px;
    }

    .icon-item i {
        font-size: 20px;
    }

    .icon-picker-tabs button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Scrollbar styling */
.icon-grid::-webkit-scrollbar,
.icon-picker-content::-webkit-scrollbar {
    width: 8px;
}

.icon-grid::-webkit-scrollbar-track,
.icon-picker-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.icon-grid::-webkit-scrollbar-thumb,
.icon-picker-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.icon-grid::-webkit-scrollbar-thumb:hover,
.icon-picker-content::-webkit-scrollbar-thumb:hover {
    background: #97bc62;
}
