/* Custom Styles for Plate Automation */

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 로딩 애니메이션 */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* 로딩 스피너 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* 카드 호버 효과 */
.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 성공/에러 메시지 */
.message-success {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 4px;
}

.message-error {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 4px;
}

.message-info {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 4px;
}

/* HTMX 요청 중 로딩 표시 */
.htmx-request {
    opacity: 0.6;
    pointer-events: none;
}

/* 페이드 인/아웃 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 상태 배지 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fed7aa;
    color: #92400e;
}

.status-error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 폼 포커스 스타일 */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #6366f1;
    ring: 2px;
    ring-color: #6366f180;
}

/* 버튼 로딩 상태 */
button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}
