/* BinKan Custom Styles - Tailwind CSS 보조 */

/* 운영자 테이블 - 캘린더 스타일 (모든 셀 테두리 표시) */
.owner-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    border: 1px solid #d4d4d8;
}
.owner-table thead th {
    background: #f4f4f5;
    color: #3f3f46;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.02em;
    padding: 10px 12px;
    border: 1px solid #d4d4d8;
    white-space: nowrap;
}
.owner-table tbody td {
    padding: 10px 12px;
    border: 1px solid #e4e4e7;
    color: #3f3f46;
    vertical-align: middle;
}
.owner-table tbody tr:nth-child(even) {
    background: #fafafa;
}
.owner-table tbody tr:hover {
    background: #f0fdf4;
}
.owner-table tbody tr td:first-child {
    color: #a1a1aa;
    text-align: center;
    font-size: 12px;
    width: 44px;
}
.owner-table .text-right { text-align: right; }
.owner-table .text-center { text-align: center; }
.owner-table .text-left { text-align: left; }
.owner-table .col-actions {
    white-space: nowrap;
}
.owner-table .empty-row td {
    text-align: center;
    color: #a1a1aa;
    padding: 32px 12px;
    border-bottom: none;
}

/* 모달 backdrop */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; }
.modal-content { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 50; background: white; border-radius: 16px; padding: 24px; max-height: 90vh; overflow-y: auto; }

/* 사이드바 */
.sidebar { width: 260px; min-height: 100vh; }
.sidebar-link {
    display: flex; align-items: center;
    padding: 10px 16px; border-radius: 10px;
    color: #64748b; font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}
.sidebar-link:hover { background: #f0fdf4; color: #15803d; }
.sidebar-link.active { background: #dcfce7; color: #15803d; font-weight: 600; }

/* 토스트 알림 */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.toast {
    padding: 12px 20px; border-radius: 10px; color: white;
    margin-bottom: 8px; font-size: 14px;
    animation: slideIn 0.3s ease;
}
.toast-success { background: #16a34a; }
.toast-error { background: #ef4444; }
.toast-info { background: #0ea5e9; }

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

/* 예약 캘린더 */
.time-slot {
    border: 1px solid #e2e8f0; padding: 8px; border-radius: 8px;
    cursor: pointer; text-align: center; font-size: 13px;
    transition: border-color 0.2s, background-color 0.2s;
}
.time-slot:hover { border-color: #16a34a; background: #f0fdf4; }
.time-slot.selected { background: #16a34a; color: white; border-color: #16a34a; }
.time-slot.booked { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.time-slot.blocked { background: #fef2f2; color: #ef4444; cursor: not-allowed; }

/* 카드 */
.space-card {
    background: white; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}
.space-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(22,163,74,0.08); }

/* 반응형 */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .sidebar.open { display: block; position: fixed; z-index: 30; box-shadow: 4px 0 24px rgba(0,0,0,0.1); }
}

/* 스켈레톤 로딩 */
.skeleton {
    background: linear-gradient(90deg, #f0fdf4 25%, #dcfce7 50%, #f0fdf4 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite; border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* 상태 뱃지 */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 12px; font-weight: 500; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dcfce7; color: #166534; }
.badge-completed { background: #dbeafe; color: #1e40af; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

/* 포커스 스타일 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #16a34a; outline-offset: 2px; border-radius: 4px;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    .toast, .space-card, .sidebar-link, .time-slot { transition: none; }
    .skeleton { animation: none; }
    .animate-spin { animation: none; }
}

/* 카카오맵 마커 */
.custom-marker {
    background: white;
    border: 2px solid #16a34a;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #166534;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, color 0.2s;
}
.custom-marker:hover, .custom-marker.active {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(22,163,74,0.2);
}
.custom-marker.selected {
    background: #16a34a;
    color: white;
    border-color: #15803d;
}

/* 공간 목록 카드 */
.space-list-card {
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}
.space-list-card:hover {
    background: #f0fdf4;
    border-color: #dcfce7;
}
.space-list-card.active {
    background: #f0fdf4;
    border-color: #16a34a;
}

/* 예약 모달 */
.booking-modal {
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 시간 슬롯 그리드 */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
@media (min-width: 640px) {
    .slot-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1024px) {
    .slot-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 공통 유틸리티 */
[x-cloak] { display: none !important; }
