/* ============================================
   RoomForge — Styles
   ============================================ */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out both;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out both;
}

.delay-1 {
    animation-delay: 0.05s;
}

.delay-2 {
    animation-delay: 0.1s;
}

.delay-3 {
    animation-delay: 0.15s;
}

/* Tool Buttons */
.tool-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-btn:hover {
    background: #E0E7FF;
    color: #4F46E5;
    transform: scale(1.08);
}

.tool-btn.active {
    background: #4F46E5;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Furniture Cards */
.furniture-card {
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.furniture-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #818CF8;
    background: #ffffff;
}

.furniture-card:active {
    transform: translateY(0);
}

/* Canvas Container */
#canvas-wrapper {
    width: 100%;
    height: 100%;
    outline: none;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    background-color: #FAFBFC;
    position: relative;
    overflow: hidden;
}

/* Scrollbar */
.custom-scroll::-webkit-scrollbar {
    width: 4px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Tabs */
.tab-active {
    background: #1F2937;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Nav Links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #4F46E5;
    transition: all 0.25s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active-nav::after {
    width: 100%;
}

/* Properties Panel */
.prop-input {
    width: 100%;
    background: #F4F5F7;
    border: 1px solid #E8EAED;
    border-radius: 8px;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    color: #1F2937;
    font-weight: 500;
    font-family: 'Satoshi', sans-serif;
    transition: border-color 0.2s;
}

.prop-input:focus {
    outline: none;
    border-color: #818CF8;
    background: #fff;
}

.prop-label {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #9CA3AF;
    font-weight: 600;
    pointer-events: none;
}

/* Color Swatch */
.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid #E8EAED;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.color-swatch::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-swatch::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-swatch:hover {
    border-color: #818CF8;
    transform: scale(1.1);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Satoshi', sans-serif;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.35s ease-out both;
}

.toast.fade-out {
    animation: toastOut 0.3s ease-in both;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding-bottom: 2rem;
}

.tab-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Sidebar Tab Buttons */
.sidebar-tab {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: #6B7280;
    font-family: 'Satoshi', sans-serif;
    white-space: nowrap;
}

.sidebar-tab:hover {
    background: #F4F5F7;
    color: #1F2937;
}

.sidebar-tab.active {
    background: #1F2937;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Accordion */
.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    user-select: none;
}

.accordion-header:hover .accordion-arrow {
    background: #F4F5F7;
    color: #1F2937;
}

.accordion-arrow {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #9CA3AF;
}

.accordion-header.collapsed .accordion-arrow {
    transform: rotate(-90deg);
}

.accordion-header .accordion-arrow {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Search Input */
.search-input {
    width: 100%;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 10px 10px 10px 36px;
    font-size: 13px;
    color: #1F2937;
    transition: all 0.2s;
}

.search-input:focus {
    width: 100%;
    outline: none;
    border-color: #818CF8;
    background: #ffffff;
    box-shadow: 0 0 0 2px #E0E7FF;
}

/* Undo/Redo Buttons */
.history-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 1px solid #E5E7EB;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.history-btn:hover:not(:disabled) {
    background: #F3F4F6;
    color: #111827;
    border-color: #D1D5DB;
}

.history-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #F9FAFB;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 999px;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E7EB;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4B5563;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: #F3F4F6;
    color: #111827;
}

.zoom-display {
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    min-width: 60px;
    text-align: center;
    font-feature-settings: "tnum";
}

/* 3D Labels */
.d-label {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Satoshi', sans-serif;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    margin-top: -1em;
    font-feature-settings: "tnum";
    white-space: nowrap;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}