/* ============================================
   Friend Search Modal Styles
   일관된 디자인 시스템 적용
   ============================================ */

/* Modal Overlay */
.friend-search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content */
.friend-search-modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

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

/* Modal Header */
.friend-search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.friend-search-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.friend-search-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.friend-search-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Modal Body */
.friend-search-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Search Input */
.friend-search-input-wrapper {
    margin-bottom: 20px;
}

.friend-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.friend-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb, 139, 92, 246), 0.1);
}

.friend-search-input::placeholder {
    color: var(--text-tertiary);
}

/* Search Results */
.friend-search-results {
    min-height: 200px;
}

.friend-search-empty,
.friend-search-loading,
.friend-search-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-secondary);
    text-align: center;
}

.friend-search-loading {
    color: var(--accent-primary);
}

.friend-search-error {
    color: var(--error);
}

/* Search Sections */
.friend-search-section {
    margin-bottom: 24px;
}

.friend-search-section:last-child {
    margin-bottom: 0;
}

.friend-search-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding: 0 4px;
}

/* Search List */
.friend-search-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Search Item */
.friend-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.friend-search-item:hover {
    background: var(--bg-hover);
}

/* Avatar */
.friend-search-item-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.friend-search-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-search-item-avatar-fallback {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Info */
.friend-search-item-info {
    flex: 1;
    min-width: 0;
}

.friend-search-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-search-item-username {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Actions */
.friend-search-item-actions {
    flex-shrink: 0;
}

.friend-search-action-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.friend-search-action-btn:hover:not(:disabled) {
    background: var(--accent-primary-hover);
    transform: translateY(-1px);
}

.friend-search-action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.friend-search-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.friend-search-status-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: 6px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .friend-search-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .friend-search-modal-header {
        padding: 16px;
    }

    .friend-search-modal-header h2 {
        font-size: 18px;
    }

    .friend-search-modal-body {
        padding: 16px;
    }

    .friend-search-item {
        padding: 10px;
        gap: 10px;
    }

    .friend-search-item-avatar {
        width: 40px;
        height: 40px;
    }

    .friend-search-item-avatar-fallback {
        font-size: 18px;
    }

    .friend-search-item-name {
        font-size: 14px;
    }

    .friend-search-item-username {
        font-size: 12px;
    }

    .friend-search-action-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Dark mode specific adjustments */
html[data-theme="dark"] .friend-search-modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

/* Light mode specific adjustments */
html[data-theme="light"] .friend-search-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

