/* static/css/sakane-design-system.css */
/* Sakane Sangyo Design System - Professional Materials & Construction */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Sakane Sangyo Color Palette */
    --ss-primary: #2B3444;
    --ss-primary-light: #3A4659;   
    --ss-primary-dark: #1E2530;    
    
    --ss-secondary: #8B9DC3;
    --ss-secondary-light: #A8B8D4;
    --ss-secondary-dark: #6B7FA0;
    
    --ss-accent: #C4A484;
    --ss-accent-light: #D4B89A;
    --ss-accent-dark: #B0956F;
    
    --ss-neutral-50: #FAFBFC;
    --ss-neutral-100: #F4F6F8;
    --ss-neutral-200: #E8ECF0;
    --ss-neutral-300: #D1D8E0;
    --ss-neutral-400: #9AA4B2;
    --ss-neutral-500: #6B7484;
    --ss-neutral-600: #4A5568;
    --ss-neutral-700: #2D3748;
    --ss-neutral-800: #1A202C;
    --ss-neutral-900: #171923;
    --ss-ist-blue: #f0f5fc;    
    --ss-success: #38A169;
    --ss-error: #E53E3E;
    
    /* Shadows - Japanese paper-inspired */
    --ss-shadow-sm: 0 1px 2px 0 rgba(43, 52, 68, 0.05);
    --ss-shadow: 0 4px 6px -1px rgba(43, 52, 68, 0.1);
    --ss-shadow-lg: 0 10px 15px -3px rgba(43, 52, 68, 0.1);
    
    /* Border radius */
    --ss-radius-sm: 4px;
    --ss-radius: 8px;
    --ss-radius-lg: 12px;
    --ss-radius-xl: 16px;
    
    /* Spacing system (8px grid) */
    --ss-space-1: 4px;
    --ss-space-2: 8px;
    --ss-space-3: 12px;
    --ss-space-4: 16px;
    --ss-space-5: 20px;
    --ss-space-6: 24px;
    --ss-space-8: 32px;
    --ss-space-10: 40px;
    --ss-space-12: 48px;
    --ss-space-16: 64px;
}

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ss-neutral-50);
    color: var(--ss-neutral-700);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
.text-display {
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ss-primary);
}

.text-headline {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ss-primary);
}

.text-title {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ss-neutral-700);
}

.text-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ss-neutral-700);
}

.text-body {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ss-neutral-600);
}

.text-small {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ss-neutral-500);
}

.text-caption {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--ss-neutral-400);
}

/* Color utilities */
.text-ss-primary { color: var(--ss-primary); }
.text-ss-secondary { color: var(--ss-secondary); }
.text-ss-accent { color: var(--ss-accent); }
.text-ss-success { color: var(--ss-success); }
.text-ss-warning { color: var(--ss-warning); }
.text-ss-error { color: var(--ss-error); }
.text-ss-neutral-700 { color: var(--ss-neutral-700); }
.text-ss-neutral-600 { color: var(--ss-neutral-600); }
.text-ss-neutral-500 { color: var(--ss-neutral-500); }
.text-ss-neutral-400 { color: var(--ss-neutral-400); }
.text-ss-neutral-200 { color: var(--ss-neutral-200); }

.bg-ss-success\/10 { background-color: rgba(56, 161, 105, 0.1); }
.bg-ss-warning\/10 { background-color: rgba(214, 158, 46, 0.1); }
.bg-ss-error\/10 { background-color: rgba(229, 62, 62, 0.1); }
.bg-ss-neutral-100 { background-color: var(--ss-neutral-100); }

.border-ss-neutral-300 { border-color: var(--ss-neutral-300); }

/* Input Fields - Core component */
.ss-input {
    background: white;
    border: 1px solid var(--ss-neutral-300);
    border-radius: var(--ss-radius);
    padding: 9px 12px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--ss-neutral-700);
    transition: all 0.2s ease;
    box-shadow: var(--ss-shadow-sm);
    width: 100%;
}
.text-red {
    color: var(--ss-error);
}
.ss-input:focus {
    outline: none;
    border-color: var(--ss-secondary);
    box-shadow: 0 0 0 3px rgba(139, 157, 195, 0.1);
    transform: translateY(-1px);
}

.ss-input:hover:not(:focus) {
    border-color: var(--ss-neutral-400);
}

.ss-input.error {
    border-color: var(--ss-error);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.ss-input:disabled {
    background-color: var(--ss-neutral-100);
    color: var(--ss-neutral-500);
    cursor: not-allowed;
}

.ss-input[readonly] {
    background-color: var(--ss-neutral-50);
    color: var(--ss-neutral-600);
}

/* Buttons - Core component */
.ss-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--ss-radius);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--ss-shadow-sm);
    border: 1px solid transparent;
}

.ss-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--ss-shadow);
}

.ss-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.ss-button.primary {
    background: var(--ss-primary);
    color: white;
    border-color: var(--ss-primary);
}

.ss-button.primary:hover:not(:disabled) {
    background: var(--ss-primary-light);
    border-color: var(--ss-primary-light);
}

.ss-button.secondary {
    background: white;
    color: var(--ss-primary);
    border-color: var(--ss-neutral-300);
}

.ss-button.secondary:hover:not(:disabled) {
    background: var(--ss-neutral-50);
    border-color: var(--ss-secondary);
    color: var(--ss-secondary);
}

.ss-button.success {
    background: var(--ss-success);
    color: white;
    border-color: var(--ss-success);
}

.ss-button.success:hover:not(:disabled) {
    background: #2F855A;
    border-color: #2F855A;
}

.ss-button.danger {
    background: var(--ss-error);
    color: white;
    border-color: var(--ss-error);
}

.ss-button.danger:hover:not(:disabled) {
    background: #C53030;
    border-color: #C53030;
}

.ss-button.accent {
    background: var(--ss-accent);
    color: white;
    border-color: var(--ss-accent);
}

.ss-button.accent:hover:not(:disabled) {
    background: var(--ss-accent-dark);
    border-color: var(--ss-accent-dark);
}

/* Cards - Layout component */
.ss-card {
    background: white;
    border-radius: var(--ss-radius-lg);
    box-shadow: var(--ss-shadow);
    overflow: hidden;
    margin-bottom: var(--ss-space-6);
}

.ss-section-header {
    background: linear-gradient(135deg, var(--ss-primary) 0%, var(--ss-primary-light) 100%);
    color: white;
    padding: var(--ss-space-5) var(--ss-space-6);
    border-bottom: 1px solid var(--ss-neutral-200);
}

.ss-section-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Form-specific components */
.checkbox-card {
    border: 1px solid var(--ss-neutral-200);
    border-radius: var(--ss-radius);
    padding: var(--ss-space-4);
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.checkbox-card:hover {
    border-color: var(--ss-secondary);
    background: rgba(139, 157, 195, 0.05);
}

.checkbox-card.checked {
    border-color: var(--ss-secondary);
    background: rgba(139, 157, 195, 0.1);
}

.line-item-row {
    border: 1px solid var(--ss-neutral-200);
    border-radius: var(--ss-radius);
    padding: var(--ss-space-4);
    margin-bottom: var(--ss-space-3);
    transition: all 0.2s ease;
    background: white;
}

.line-item-row:hover {
    box-shadow: var(--ss-shadow-sm);
    border-color: var(--ss-neutral-300);
}

/* Progress indicators */
.progress-bar {
    height: 4px;
    background: var(--ss-neutral-200);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ss-secondary) 0%, var(--ss-accent) 100%);
    transition: width 0.3s ease;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.step-indicator.completed {
    background: var(--ss-success);
    color: white;
}

.step-indicator.active {
    background: var(--ss-secondary);
    color: white;
}

.step-indicator.pending {
    background: var(--ss-neutral-200);
    color: var(--ss-neutral-500);
}

/* Utility classes */
.ma-space {
    margin: var(--ss-space-6) 0;
}

.ma-space-lg {
    margin: var(--ss-space-12) 0;
}

.floating-summary {
    position: sticky;
    top: var(--ss-space-6);
}

/* Responsive utilities */
@media (max-width: 1024px) {
    .floating-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .ss-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .ss-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .text-display {
        font-size: 1.875rem;
    }
    
    .text-headline {
        font-size: 1.5rem;
    }
}

/* Field visibility toggles */
.billing-field,
.delivery-field {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.billing-field.hidden,
.delivery-field.hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Focus management */
.ss-input:focus-visible,
.ss-button:focus-visible {
    outline: 2px solid var(--ss-secondary);
    outline-offset: 2px;
}

/* Loading states */
.ss-button.loading {
    position: relative;
    color: transparent;
}

.ss-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Print styles */
@media print {
    .ss-card {
        box-shadow: none;
        border: 1px solid var(--ss-neutral-300);
    }
    
    .ss-button {
        display: none;
    }
    
    .floating-summary {
        position: static;
    }
}
/* Component-specific styles for the header using the Sakane Design System */

/* Site Header Container */
.site-header {
background-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--ss-shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--ss-space-3) 0;
    border-top: 5px solid rgb(28, 90, 165);
    border-bottom: 1px solid rgb(0, 0, 0);}

.site-header.customer-screen {
    background-color: rgba(240, 245, 252, 0.9); /* Customer facing screens */
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--ss-space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-image {
    height: 50px; /* Specific component dimension */
    width: auto;
    margin-right: var(--ss-space-4);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.company-name-jp {
    font-size: 1.125rem; /* Matches .ss-section-header h3 */
    font-weight: 500;
    color: var(--ss-primary);
}

.company-name-en {
    font-size: 0.75rem; /* .text-caption size */
    color: var(--ss-neutral-500);
    letter-spacing: 0.5px;
}

/* Main Navigation */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--ss-space-6);
}

.main-nav a {
    text-decoration: none;
    color: var(--ss-neutral-700);
    font-weight: 500;
    font-size: 0.875rem; /* .text-small size */
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--ss-secondary);
}

/* Circular Menu Toggle Button */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 52px;
    height: 52px;
    background-color: var(--ss-secondary); /* Using secondary blue from the design system */
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease;
}

.menu-toggle:hover {
    background-color: var(--ss-secondary-dark);
}

.menu-icon {
    width: 20px;
    height: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
}

.menu-text {
    font-size: 0.6rem;
    text-transform: uppercase;
    margin-top: var(--ss-space-1);
    letter-spacing: 1px;
}

.bg-ist-blue {
    background-color: var(--ss-ist-blue);
}

/* Responsive Design (using breakpoint from the design system) */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .header-container {
        padding: 0 var(--ss-space-4);
    }
}