/* ===== Modal Specific Styles ===== */

/* Employee Info */
.employee-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Employee Avatar */
.employee-avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.employee-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow);
}

.employee-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--rule);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

/* Avatar Upload */
.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px dashed var(--rule);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.avatar-preview:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview span {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* 确保头像预览区域可点击 */
#edit-avatar-preview {
    cursor: pointer;
    position: relative;
}

#edit-avatar-preview::after {
    content: '📷';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid white;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    font-weight: 600;
    color: var(--muted);
    min-width: 80px;
    font-size: 13px;
}

.info-row span {
    color: var(--ink);
    font-size: 14px;
}

/* Employee Form */
.employee-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* QR Code */
#qr-code-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

#qr-code-container canvas,
#qr-code-container img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.qr-hint {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

/* Area Management */
.area-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.area-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-bottom: 8px;
    background: var(--surface);
    transition: var(--transition);
}

.area-item:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.area-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.area-item-name {
    flex: 1;
    font-weight: 500;
}

.area-item-actions {
    display: flex;
    gap: 4px;
}

.area-item-actions button {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.area-item-actions .btn-edit {
    background: var(--primary);
    color: white;
}

.area-item-actions .btn-delete {
    background: var(--danger);
    color: white;
}

.area-form {
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}

/* Upload */
.upload-area {
    border: 2px dashed var(--rule);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
}

.upload-area.drag-over {
    border-color: var(--primary);
    background: rgb(59 130 246 / 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.upload-icon {
    font-size: 36px;
    opacity: 0.6;
}

.upload-hint {
    font-size: 12px;
    opacity: 0.7;
}

.upload-preview {
    margin-top: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--rule);
}

.upload-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

/* Search Panel */
.search-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 100%;
    height: 100%;
    background: var(--surface);
    border-left: 1px solid var(--rule);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.search-panel.hidden {
    transform: translateX(100%);
    display: flex !important;
    pointer-events: none;
    opacity: 0;
}

.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rule);
}

.search-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.search-result-item {
    padding: 12px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface);
}

.search-result-item:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: translateX(4px);
}

.search-result-item .result-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.search-result-item .result-meta {
    font-size: 12px;
    color: var(--muted);
}

.search-result-item .result-seat {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 4px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

/* Notification */
.notification-container {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    font-size: 14px;
    max-width: 320px;
    animation: notificationSlideIn 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    border-left-color: var(--success);
}

.notification.error {
    border-left-color: var(--danger);
}

.notification.warning {
    border-left-color: var(--warning);
}

.notification.info {
    border-left-color: var(--info);
}

.notification.removing {
    animation: notificationSlideOut 0.3s ease forwards;
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
