/**
 * Virtual Home Staging - Public Styles
 * テーマカラー: #4d65ff → #1a1a1a グラデーション
 */

/* ====================================
   Theme Override (Fullscreen Pages)
   ==================================== */
body.vhs-fullscreen {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.vhs-fullscreen #page,
body.vhs-fullscreen .site,
body.vhs-fullscreen #content,
body.vhs-fullscreen .site-content,
body.vhs-fullscreen .content-area,
body.vhs-fullscreen .site-main,
body.vhs-fullscreen main,
body.vhs-fullscreen article,
body.vhs-fullscreen .entry-content,
body.vhs-fullscreen .post-content,
body.vhs-fullscreen .page-content,
body.vhs-fullscreen .wp-block-group,
body.vhs-fullscreen .wp-container-core-group-is-layout-1 {
    max-width: 100% !important;
    max-width: 100vw !important;
    width: 100% !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* VHSダッシュボードを全画面表示 */
body.vhs-fullscreen .vhs-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    z-index: 9999 !important;
}

body.vhs-fullscreen header:not(.vhs-header),
body.vhs-fullscreen footer,
body.vhs-fullscreen .site-header,
body.vhs-fullscreen .site-footer,
body.vhs-fullscreen #masthead,
body.vhs-fullscreen #colophon,
body.vhs-fullscreen .sidebar:not(.vhs-sidebar),
body.vhs-fullscreen aside:not(.vhs-sidebar):not(.vhs-history-panel),
body.vhs-fullscreen nav.main-navigation,
body.vhs-fullscreen .wp-block-post-title,
body.vhs-fullscreen .entry-title,
body.vhs-fullscreen .page-title {
    display: none !important;
}

body.vhs-login-body {
    background: #1a1a1a !important;
}

body.vhs-dashboard-body {
    background: #f5f5f5 !important;
}

/* ====================================
   CSS Variables (Design System)
   ==================================== */
:root {
    /* Theme Colors */
    --vhs-primary: #4d65ff;
    --vhs-primary-dark: #3a4fd9;
    --vhs-secondary: #1a1a1a;
    --vhs-gradient: linear-gradient(135deg, #4d65ff 0%, #1a1a1a 100%);
    --vhs-gradient-reverse: linear-gradient(135deg, #1a1a1a 0%, #4d65ff 100%);

    /* Neutral Colors */
    --vhs-white: #ffffff;
    --vhs-gray-50: #fafafa;
    --vhs-gray-100: #f5f5f5;
    --vhs-gray-200: #e5e5e5;
    --vhs-gray-300: #d4d4d4;
    --vhs-gray-400: #a3a3a3;
    --vhs-gray-500: #737373;
    --vhs-gray-600: #525252;
    --vhs-gray-700: #404040;
    --vhs-gray-800: #262626;
    --vhs-gray-900: #171717;

    /* Functional Colors */
    --vhs-success: #22c55e;
    --vhs-warning: #eab308;
    --vhs-danger: #ef4444;
    --vhs-info: #3b82f6;

    /* Typography */
    --vhs-font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --vhs-font-size-xs: 0.75rem;
    --vhs-font-size-sm: 0.875rem;
    --vhs-font-size-base: 1rem;
    --vhs-font-size-lg: 1.125rem;
    --vhs-font-size-xl: 1.25rem;
    --vhs-font-size-2xl: 1.5rem;
    --vhs-font-size-3xl: 1.875rem;

    /* Spacing */
    --vhs-spacing-xs: 4px;
    --vhs-spacing-sm: 8px;
    --vhs-spacing-md: 16px;
    --vhs-spacing-lg: 24px;
    --vhs-spacing-xl: 32px;
    --vhs-spacing-2xl: 48px;

    /* Border Radius */
    --vhs-radius-sm: 4px;
    --vhs-radius-md: 8px;
    --vhs-radius-lg: 12px;
    --vhs-radius-xl: 16px;
    --vhs-radius-full: 9999px;

    /* Shadows */
    --vhs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --vhs-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --vhs-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --vhs-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --vhs-transition-fast: 150ms ease;
    --vhs-transition-base: 200ms ease;
    --vhs-transition-slow: 300ms ease;

    /* Layout */
    --vhs-sidebar-width: 280px;
    --vhs-header-height: 60px;
    --vhs-panel-height: 80px;
    --vhs-history-width: 200px;
}

/* ====================================
   Reset & Base
   ==================================== */
.vhs-container,
.vhs-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.vhs-container {
    font-family: var(--vhs-font-family);
    font-size: var(--vhs-font-size-base);
    line-height: 1.6;
    color: var(--vhs-gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====================================
   Login Page
   ==================================== */
.vhs-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/login-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.vhs-login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(77, 101, 255, 0.75) 100%);
    z-index: 1;
}

.vhs-login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
    margin: var(--vhs-spacing-lg);
    padding: var(--vhs-spacing-2xl);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--vhs-radius-xl);
    box-shadow: var(--vhs-shadow-xl);
}

.vhs-login-logo {
    text-align: center;
    margin-bottom: var(--vhs-spacing-xl);
}

.vhs-login-logo h1 {
    font-size: var(--vhs-font-size-3xl);
    font-weight: 700;
    color: var(--vhs-white);
    letter-spacing: 0.05em;
}

.vhs-login-logo p {
    font-size: var(--vhs-font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    margin-top: var(--vhs-spacing-sm);
}

.vhs-form-group {
    margin-bottom: var(--vhs-spacing-lg);
}

.vhs-form-group label {
    display: block;
    font-size: var(--vhs-font-size-sm);
    font-weight: 500;
    color: var(--vhs-white);
    margin-bottom: var(--vhs-spacing-sm);
}

.vhs-form-control {
    width: 100%;
    padding: var(--vhs-spacing-md);
    font-size: var(--vhs-font-size-base);
    font-family: inherit;
    color: var(--vhs-gray-800);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: var(--vhs-radius-md);
    transition: all var(--vhs-transition-base);
}

.vhs-form-control:focus {
    outline: none;
    border-color: var(--vhs-primary);
    background: var(--vhs-white);
    box-shadow: 0 0 0 3px rgba(77, 101, 255, 0.2);
}

.vhs-form-control::placeholder {
    color: var(--vhs-gray-400);
}

.vhs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--vhs-spacing-sm);
    padding: var(--vhs-spacing-md) var(--vhs-spacing-xl);
    font-size: var(--vhs-font-size-base);
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: none;
    border-radius: var(--vhs-radius-md);
    cursor: pointer;
    transition: all var(--vhs-transition-base);
}

.vhs-btn-primary {
    width: 100%;
    color: var(--vhs-white);
    background: var(--vhs-gradient);
    box-shadow: var(--vhs-shadow-md);
}

.vhs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--vhs-shadow-lg);
}

.vhs-btn-primary:active {
    transform: translateY(0);
}

.vhs-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.vhs-btn-secondary {
    color: var(--vhs-white);
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.vhs-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.vhs-btn-ghost {
    width: 100%;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    text-decoration: underline;
}

.vhs-btn-ghost:hover {
    color: var(--vhs-white);
}

.vhs-login-divider {
    display: flex;
    align-items: center;
    margin: var(--vhs-spacing-xl) 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--vhs-font-size-sm);
}

.vhs-login-divider::before,
.vhs-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.vhs-login-divider span {
    padding: 0 var(--vhs-spacing-md);
}

/* ====================================
   Dashboard Layout
   ==================================== */
.vhs-dashboard {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--vhs-gray-100);
}

/* Header */
.vhs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--vhs-header-height);
    padding: 0 var(--vhs-spacing-lg);
    background: var(--vhs-gradient);
    color: var(--vhs-white);
    flex-shrink: 0;
    z-index: 100;
}

.vhs-header-logo {
    font-size: var(--vhs-font-size-xl);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.vhs-header-menu-toggle {
    display: none;
    padding: var(--vhs-spacing-sm);
    color: var(--vhs-white);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--vhs-font-size-xl);
}

/* Main Layout */
.vhs-main-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.vhs-sidebar {
    width: var(--vhs-sidebar-width);
    background: var(--vhs-white);
    border-right: 1px solid var(--vhs-gray-200);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.vhs-sidebar-section {
    padding: var(--vhs-spacing-lg);
    border-bottom: 1px solid var(--vhs-gray-200);
}

.vhs-sidebar-section:last-child {
    border-bottom: none;
    margin-top: auto;
}

.vhs-sidebar-title {
    font-size: var(--vhs-font-size-xs);
    font-weight: 600;
    color: var(--vhs-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--vhs-spacing-md);
}

.vhs-account-info {
    display: flex;
    flex-direction: column;
    gap: var(--vhs-spacing-sm);
}

.vhs-account-name {
    font-size: var(--vhs-font-size-lg);
    font-weight: 600;
    color: var(--vhs-gray-800);
}

.vhs-account-plan {
    display: inline-block;
    padding: var(--vhs-spacing-xs) var(--vhs-spacing-sm);
    font-size: var(--vhs-font-size-xs);
    font-weight: 600;
    color: var(--vhs-primary);
    background: rgba(77, 101, 255, 0.1);
    border-radius: var(--vhs-radius-full);
}

.vhs-credits-display {
    display: flex;
    align-items: baseline;
    gap: var(--vhs-spacing-xs);
    margin-top: var(--vhs-spacing-sm);
}

.vhs-credits-current {
    font-size: var(--vhs-font-size-2xl);
    font-weight: 700;
    color: var(--vhs-primary);
}

.vhs-credits-divider {
    color: var(--vhs-gray-400);
}

.vhs-credits-total {
    font-size: var(--vhs-font-size-lg);
    color: var(--vhs-gray-500);
}

.vhs-credits-label {
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-500);
    margin-left: var(--vhs-spacing-xs);
}

.vhs-reset-date {
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-500);
    margin-top: var(--vhs-spacing-sm);
}

.vhs-sidebar-menu {
    list-style: none;
}

.vhs-sidebar-menu-item {
    margin-bottom: var(--vhs-spacing-xs);
}

.vhs-sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: var(--vhs-spacing-sm);
    padding: var(--vhs-spacing-sm) var(--vhs-spacing-md);
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-700);
    text-decoration: none;
    border-radius: var(--vhs-radius-md);
    transition: all var(--vhs-transition-fast);
}

.vhs-sidebar-menu-link:hover {
    background: var(--vhs-gray-100);
    color: var(--vhs-primary);
}

.vhs-sidebar-menu-link.active {
    background: rgba(77, 101, 255, 0.1);
    color: var(--vhs-primary);
    font-weight: 600;
}

.vhs-btn-logout {
    width: 100%;
    padding: var(--vhs-spacing-md);
    font-size: var(--vhs-font-size-sm);
    font-weight: 500;
    color: var(--vhs-gray-600);
    background: var(--vhs-gray-100);
    border: none;
    border-radius: var(--vhs-radius-md);
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
}

.vhs-btn-logout:hover {
    background: var(--vhs-gray-200);
    color: var(--vhs-danger);
}

/* Main Content */
.vhs-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vhs-content-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.vhs-main-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--vhs-spacing-lg);
    overflow: auto;
}

/* Upload Area */
.vhs-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    padding: var(--vhs-spacing-2xl);
    border: 3px dashed var(--vhs-gray-300);
    border-radius: var(--vhs-radius-xl);
    background: var(--vhs-white);
    cursor: pointer;
    transition: all var(--vhs-transition-base);
}

.vhs-upload-area:hover,
.vhs-upload-area.dragover {
    border-color: var(--vhs-primary);
    background: rgba(77, 101, 255, 0.05);
}

.vhs-upload-area.dragover {
    transform: scale(1.02);
}

.vhs-upload-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--vhs-spacing-lg);
    color: var(--vhs-primary);
}

.vhs-upload-text {
    font-size: var(--vhs-font-size-lg);
    font-weight: 600;
    color: var(--vhs-gray-700);
    margin-bottom: var(--vhs-spacing-sm);
}

.vhs-upload-hint {
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-500);
}

/* Image Display */
.vhs-image-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    max-height: 100%;
}

.vhs-image-container {
    position: relative;
    width: fit-content;
    margin: 0 auto;
    max-height: calc(100vh - var(--vhs-header-height) - var(--vhs-panel-height) - 120px);
    background: var(--vhs-white);
    border-radius: var(--vhs-radius-lg);
    box-shadow: var(--vhs-shadow-lg);
    overflow: hidden;
}

.vhs-image-container img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - var(--vhs-header-height) - var(--vhs-panel-height) - 120px);
    object-fit: contain;
}

.vhs-image-toggle {
    display: flex;
    margin-top: var(--vhs-spacing-lg);
    background: var(--vhs-white);
    border-radius: var(--vhs-radius-full);
    box-shadow: var(--vhs-shadow-md);
    overflow: hidden;
}

.vhs-image-toggle-btn {
    flex: 1;
    padding: var(--vhs-spacing-sm) var(--vhs-spacing-xl);
    font-size: var(--vhs-font-size-sm);
    font-weight: 600;
    color: var(--vhs-gray-600);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
}

.vhs-image-toggle-btn.active {
    color: var(--vhs-white);
    background: var(--vhs-primary);
}

/* History Panel */
.vhs-history-panel {
    width: var(--vhs-history-width);
    background: var(--vhs-white);
    border-left: 1px solid var(--vhs-gray-200);
    padding: var(--vhs-spacing-md);
    overflow-y: auto;
    flex-shrink: 0;
}

.vhs-history-title {
    font-size: var(--vhs-font-size-sm);
    font-weight: 600;
    color: var(--vhs-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--vhs-spacing-md);
}

.vhs-history-list {
    display: flex;
    flex-direction: column;
    gap: var(--vhs-spacing-sm);
}

.vhs-history-item {
    position: relative;
    border-radius: var(--vhs-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
}

.vhs-history-item:hover {
    transform: scale(1.05);
    box-shadow: var(--vhs-shadow-md);
}

.vhs-history-item.active {
    outline: 3px solid var(--vhs-primary);
}

.vhs-history-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.vhs-history-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 18px;
    color: var(--vhs-white);
    background: var(--vhs-danger);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--vhs-transition-fast);
}

.vhs-history-item:hover .vhs-history-delete {
    opacity: 1;
}

.vhs-history-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Operation Panel */
.vhs-operation-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--vhs-spacing-md);
    height: var(--vhs-panel-height);
    padding: 0 var(--vhs-spacing-lg);
    background: var(--vhs-white);
    border-top: 1px solid var(--vhs-gray-200);
    flex-shrink: 0;
}

.vhs-op-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--vhs-spacing-xs);
    padding: var(--vhs-spacing-sm) var(--vhs-spacing-xl);
    font-size: var(--vhs-font-size-sm);
    font-weight: 500;
    color: var(--vhs-gray-700);
    background: var(--vhs-gray-100);
    border: none;
    border-radius: var(--vhs-radius-md);
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
}

.vhs-op-btn:hover:not(:disabled) {
    background: var(--vhs-primary);
    color: var(--vhs-white);
    transform: translateY(-2px);
    box-shadow: var(--vhs-shadow-md);
}

.vhs-op-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vhs-op-btn svg {
    width: 24px;
    height: 24px;
}

/* ====================================
   Modals
   ==================================== */
.vhs-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all var(--vhs-transition-base);
}

.vhs-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.vhs-modal {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    margin: var(--vhs-spacing-lg);
    background: var(--vhs-white);
    border-radius: var(--vhs-radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: all var(--vhs-transition-base);
}

.vhs-modal-overlay.active .vhs-modal {
    transform: scale(1) translateY(0);
}

/* Modal-specific button styles */
.vhs-modal .vhs-btn-secondary {
    color: var(--vhs-gray-700);
    background: var(--vhs-white);
    border: 2px solid var(--vhs-gray-300);
}

.vhs-modal .vhs-btn-secondary:hover {
    background: var(--vhs-gray-100);
    border-color: var(--vhs-primary);
    color: var(--vhs-primary);
}

.vhs-modal .vhs-btn-secondary.active {
    background: var(--vhs-primary);
    border-color: var(--vhs-primary);
    color: var(--vhs-white);
}

.vhs-modal .vhs-btn-primary {
    color: var(--vhs-white);
    background: var(--vhs-gradient);
}

.vhs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--vhs-spacing-lg);
    border-bottom: 1px solid var(--vhs-gray-200);
    background: var(--vhs-white);
}

.vhs-modal-title {
    font-size: var(--vhs-font-size-xl);
    font-weight: 600;
    color: var(--vhs-gray-800);
}

.vhs-modal-close {
    padding: var(--vhs-spacing-sm);
    color: var(--vhs-gray-500);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--vhs-font-size-xl);
    line-height: 1;
}

.vhs-modal-close:hover {
    color: var(--vhs-gray-800);
}

.vhs-modal-body {
    padding: var(--vhs-spacing-xl);
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    /* max-height: 65vh; Removed to allow flex filling */
    background: var(--vhs-white);
}

/* Modal Form Elements */
.vhs-modal-body label {
    display: block;
    font-size: var(--vhs-font-size-sm);
    font-weight: 600;
    color: var(--vhs-gray-700);
    margin-bottom: var(--vhs-spacing-sm);
}

.vhs-modal-body select,
.vhs-modal-body input,
.vhs-modal-body textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: var(--vhs-spacing-md);
    font-size: var(--vhs-font-size-base);
    font-family: inherit;
    color: var(--vhs-gray-800);
    background: var(--vhs-white);
    border: 2px solid var(--vhs-gray-300);
    border-radius: var(--vhs-radius-md);
    transition: all var(--vhs-transition-base);
    resize: vertical;
}

.vhs-modal-body select:focus,
.vhs-modal-body input:focus,
.vhs-modal-body textarea:focus {
    outline: none;
    border-color: var(--vhs-primary);
    box-shadow: 0 0 0 3px rgba(77, 101, 255, 0.15);
}

.vhs-modal-body .vhs-form-group {
    margin-bottom: var(--vhs-spacing-lg);
}

.vhs-modal-body p,
.vhs-modal-body span {
    color: var(--vhs-gray-700);
}

.vhs-modal-footer {
    display: flex;
    flex-shrink: 0;
    gap: var(--vhs-spacing-md);
    padding: var(--vhs-spacing-lg);
    border-top: 1px solid var(--vhs-gray-200);
    background: var(--vhs-gray-50);
}

.vhs-modal-footer .vhs-btn {
    flex: 1;
}

/* Furniture Category Styles */
.vhs-furniture-category {
    margin-bottom: var(--vhs-spacing-lg);
    padding-bottom: var(--vhs-spacing-md);
    border-bottom: 1px solid var(--vhs-gray-200);
}

.vhs-furniture-category:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.vhs-category-title {
    font-size: var(--vhs-font-size-sm);
    font-weight: 700;
    color: var(--vhs-primary);
    margin-bottom: var(--vhs-spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vhs-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--vhs-spacing-sm);
}

.vhs-checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--vhs-spacing-sm);
    padding: var(--vhs-spacing-sm);
    background: var(--vhs-gray-50);
    border: 1px solid var(--vhs-gray-200);
    border-radius: var(--vhs-radius-md);
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
}

.vhs-checkbox-item:hover {
    background: var(--vhs-gray-100);
    border-color: var(--vhs-primary);
}

.vhs-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--vhs-primary);
}

.vhs-checkbox-item span {
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-700);
}

/* ====================================
   Toast Notifications
   ==================================== */
.vhs-toast-container {
    position: fixed;
    top: var(--vhs-spacing-lg);
    right: var(--vhs-spacing-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--vhs-spacing-sm);
}

.vhs-toast {
    display: flex;
    align-items: center;
    gap: var(--vhs-spacing-md);
    padding: var(--vhs-spacing-md) var(--vhs-spacing-lg);
    min-width: 300px;
    max-width: 400px;
    background: var(--vhs-white);
    border-radius: var(--vhs-radius-md);
    box-shadow: var(--vhs-shadow-lg);
    animation: vhs-toast-in 0.3s ease forwards;
}

.vhs-toast.removing {
    animation: vhs-toast-out 0.3s ease forwards;
}

.vhs-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.vhs-toast-success .vhs-toast-icon {
    color: var(--vhs-success);
}

.vhs-toast-error .vhs-toast-icon {
    color: var(--vhs-danger);
}

.vhs-toast-warning .vhs-toast-icon {
    color: var(--vhs-warning);
}

.vhs-toast-info .vhs-toast-icon {
    color: var(--vhs-info);
}

.vhs-toast-message {
    flex: 1;
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-700);
}

.vhs-toast-close {
    padding: var(--vhs-spacing-xs);
    color: var(--vhs-gray-400);
    background: transparent;
    border: none;
    cursor: pointer;
}

.vhs-toast-close:hover {
    color: var(--vhs-gray-600);
}

@keyframes vhs-toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes vhs-toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ====================================
   Loading Spinner
   ==================================== */
.vhs-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    z-index: 3000;
}

.vhs-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--vhs-gray-200);
    border-top-color: var(--vhs-primary);
    border-radius: 50%;
    animation: vhs-spin 1s linear infinite;
}

.vhs-spinner-text {
    margin-top: var(--vhs-spacing-lg);
    font-size: var(--vhs-font-size-base);
    color: var(--vhs-gray-600);
}

@keyframes vhs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====================================
   Form Elements
   ==================================== */
.vhs-select {
    width: 100%;
    padding: var(--vhs-spacing-md);
    font-size: var(--vhs-font-size-base);
    font-family: inherit;
    color: var(--vhs-gray-800);
    background: var(--vhs-white);
    border: 2px solid var(--vhs-gray-200);
    border-radius: var(--vhs-radius-md);
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 48px;
}

.vhs-select:focus {
    outline: none;
    border-color: var(--vhs-primary);
    box-shadow: 0 0 0 3px rgba(77, 101, 255, 0.2);
}

.vhs-textarea {
    width: 100%;
    min-height: 120px;
    padding: var(--vhs-spacing-md);
    font-size: var(--vhs-font-size-base);
    font-family: inherit;
    color: var(--vhs-gray-800);
    background: var(--vhs-white);
    border: 2px solid var(--vhs-gray-200);
    border-radius: var(--vhs-radius-md);
    resize: vertical;
    transition: all var(--vhs-transition-fast);
}

.vhs-textarea:focus {
    outline: none;
    border-color: var(--vhs-primary);
    box-shadow: 0 0 0 3px rgba(77, 101, 255, 0.2);
}

.vhs-char-count {
    font-size: var(--vhs-font-size-xs);
    color: var(--vhs-gray-500);
    text-align: right;
    margin-top: var(--vhs-spacing-xs);
}

.vhs-char-count.warning {
    color: var(--vhs-warning);
}

.vhs-char-count.error {
    color: var(--vhs-danger);
}

.vhs-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--vhs-spacing-sm);
}

.vhs-checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--vhs-spacing-sm);
    padding: var(--vhs-spacing-sm);
    background: var(--vhs-gray-50);
    border-radius: var(--vhs-radius-sm);
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
}

.vhs-checkbox-item:hover {
    background: var(--vhs-gray-100);
}

.vhs-checkbox-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--vhs-primary);
}

.vhs-checkbox-item label {
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-700);
    cursor: pointer;
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 1024px) {
    :root {
        --vhs-sidebar-width: 240px;
        --vhs-history-width: 160px;
    }
}

@media (max-width: 768px) {
    .vhs-header-menu-toggle {
        display: block;
    }

    .vhs-sidebar {
        position: fixed;
        top: var(--vhs-header-height);
        left: 0;
        bottom: 0;
        width: var(--vhs-sidebar-width);
        z-index: 200;
        transform: translateX(-100%);
        transition: transform var(--vhs-transition-base);
    }

    .vhs-sidebar.active {
        transform: translateX(0);
        box-shadow: var(--vhs-shadow-xl);
    }

    .vhs-sidebar-overlay {
        position: fixed;
        top: var(--vhs-header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 199;
        opacity: 0;
        visibility: hidden;
        transition: all var(--vhs-transition-base);
    }

    .vhs-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .vhs-history-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: var(--vhs-panel-height);
        width: 100%;
        height: auto;
        max-height: 120px;
        border-left: none;
        border-top: 1px solid var(--vhs-gray-200);
        padding: var(--vhs-spacing-sm);
        overflow-x: auto;
        overflow-y: hidden;
    }

    .vhs-history-title {
        display: none;
    }

    .vhs-history-list {
        flex-direction: row;
        gap: var(--vhs-spacing-sm);
    }

    .vhs-history-item {
        flex-shrink: 0;
        width: 80px;
    }

    .vhs-main-area {
        padding-bottom: 140px;
    }

    .vhs-operation-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .vhs-op-btn {
        flex: 1;
        padding: var(--vhs-spacing-sm);
    }

    .vhs-op-btn span {
        font-size: var(--vhs-font-size-xs);
    }

    .vhs-modal {
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .vhs-checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* ====================================
   Utilities
   ==================================== */
.vhs-hidden {
    display: none !important;
}

.vhs-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Watermark Overlay */
.vhs-watermark-overlay {
    position: absolute;
    z-index: 10;
    cursor: move;
    user-select: none;
    touch-action: none;
    width: 20%;
    /* Default width relative to container */
    max-width: 90%;
    min-width: 5%;
}

.vhs-watermark-overlay img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    /* Let clicks pass through to container for drag */
}

.vhs-watermark-overlay.vhs-hidden {
    display: none;
}

.vhs-watermark-handle {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: var(--vhs-primary);
    border: 2px solid var(--vhs-white);
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 11;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Watermark Controls */
.vhs-watermark-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--vhs-spacing-md);
    margin-top: var(--vhs-spacing-md);
}

.vhs-watermark-controls.vhs-hidden {
    display: none;
}

.vhs-watermark-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--vhs-gray-600);
    background: var(--vhs-white);
    border: 1px solid var(--vhs-gray-300);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--vhs-transition-fast);
}

.vhs-watermark-nav:hover {
    color: var(--vhs-primary);
    border-color: var(--vhs-primary);
    background: rgba(77, 101, 255, 0.05);
}

.vhs-watermark-nav svg {
    width: 16px;
    height: 16px;
}

.vhs-watermark-info {
    font-size: var(--vhs-font-size-sm);
    color: var(--vhs-gray-600);
    font-weight: 500;
    min-width: 120px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all var(--vhs-transition-fast);
    padding: 6px 12px;
    background: var(--vhs-gray-50);
    border: 1px solid var(--vhs-gray-200);
    border-radius: var(--vhs-radius-full);
}

.vhs-watermark-info:hover {
    background: var(--vhs-gray-100);
    border-color: var(--vhs-gray-300);
}

.vhs-watermark-info.active {
    color: var(--vhs-white);
    background: var(--vhs-primary);
    border-color: var(--vhs-primary);
    font-weight: 600;
    box-shadow: var(--vhs-shadow-sm);
}