/* ===================================
   WIREFRAME STYLES
   Design System Reference for UX Designers
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #F5F5F5;
    color: #333;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.wireframe-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===================================
   WIREFRAME HEADER
   =================================== */

.wireframe-header {
    background: white;
    border: 2px solid #666;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.wireframe-header h1 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.wireframe-header .module-name {
    font-size: 1.125rem;
    color: #666;
    font-weight: 600;
}

.wireframe-nav {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.wireframe-nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    margin-right: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #ccc;
}

.wireframe-nav a:hover {
    background: #e0e0e0;
}

/* ===================================
   WIREFRAME SECTIONS
   =================================== */

.wireframe-section {
    background: white;
    border: 2px solid #999;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.wireframe-section h2 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
}

.wireframe-section h3 {
    font-size: 1rem;
    color: #555;
    margin: 1rem 0 0.5rem;
}

.wireframe-note {
    background: #FFF9E6;
    border-left: 4px solid #FFC107;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #666;
}

.wireframe-note strong {
    color: #F57C00;
}

/* ===================================
   WIREFRAME COMPONENTS
   =================================== */

.wf-screen {
    border: 3px solid #333;
    border-radius: 8px;
    padding: 1rem;
    background: #FAFAFA;
    margin: 1rem 0;
}

.wf-topbar {
    background: #E0E0E0;
    height: 50px;
    border: 1px solid #999;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.wf-topbar-left,
.wf-topbar-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.wf-icon {
    width: 30px;
    height: 30px;
    background: #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
}

.wf-text {
    background: #D0D0D0;
    height: 16px;
    border-radius: 2px;
}

.wf-text.small { width: 80px; }
.wf-text.medium { width: 120px; }
.wf-text.large { width: 200px; }

.wf-button {
    background: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    font-weight: 600;
}

.wf-button.secondary {
    background: #999;
}

.wf-button.primary {
    background: #2196F3;
}

.wf-button.danger {
    background: #F44336;
}

/* ===================================
   GRID LAYOUTS
   =================================== */

.wf-grid {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
}

.wf-grid-2 { grid-template-columns: repeat(2, 1fr); }
.wf-grid-3 { grid-template-columns: repeat(3, 1fr); }
.wf-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 968px) {
    .wf-grid-3, .wf-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .wf-grid-2, .wf-grid-3, .wf-grid-4 { grid-template-columns: 1fr; }
}

.wf-card {
    background: white;
    border: 2px solid #999;
    padding: 1rem;
    border-radius: 4px;
    min-height: 120px;
}

.wf-card-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.wf-card-body {
    color: #666;
    font-size: 0.875rem;
}

/* ===================================
   FORM ELEMENTS
   =================================== */

.wf-form-group {
    margin-bottom: 1rem;
}

.wf-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #555;
    font-size: 0.875rem;
}

.wf-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #999;
    border-radius: 4px;
    background: white;
    font-size: 0.875rem;
}

.wf-select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #999;
    border-radius: 4px;
    background: white;
    font-size: 0.875rem;
}

.wf-textarea {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #999;
    border-radius: 4px;
    background: white;
    font-size: 0.875rem;
    min-height: 100px;
    resize: vertical;
}

.wf-checkbox,
.wf-radio {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* ===================================
   LISTS & TABLES
   =================================== */

.wf-list {
    list-style: none;
}

.wf-list-item {
    background: white;
    border: 1px solid #ccc;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wf-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #999;
}

.wf-table th,
.wf-table td {
    padding: 0.75rem;
    border: 1px solid #ccc;
    text-align: left;
}

.wf-table th {
    background: #E0E0E0;
    font-weight: 600;
}

/* ===================================
   TABS & NAVIGATION
   =================================== */

.wf-tabs {
    display: flex;
    border-bottom: 2px solid #999;
    margin-bottom: 1rem;
}

.wf-tab {
    padding: 0.75rem 1.5rem;
    background: #F0F0F0;
    border: 2px solid #999;
    border-bottom: none;
    cursor: pointer;
    margin-right: 0.25rem;
    font-weight: 600;
}

.wf-tab.active {
    background: white;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
}

/* ===================================
   MODALS & OVERLAYS
   =================================== */

.wf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.wf-modal {
    background: white;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
}

.wf-modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ddd;
}

.wf-modal-body {
    margin-bottom: 1rem;
}

.wf-modal-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

/* ===================================
   CHARTS & DATA VIZ
   =================================== */

.wf-chart {
    background: white;
    border: 2px solid #999;
    padding: 1rem;
    border-radius: 4px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.wf-chart-placeholder {
    text-align: center;
}

.wf-graph-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 150px;
    padding: 1rem;
}

.wf-bar {
    flex: 1;
    background: #999;
    min-height: 30px;
}

/* ===================================
   ANNOTATIONS
   =================================== */

.wf-annotation {
    position: relative;
    padding-left: 2rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
}

.wf-annotation::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #2196F3;
    font-weight: 700;
    font-size: 1.25rem;
}

/* ===================================
   DEVICE FRAMES
   =================================== */

.wf-mobile-frame {
    max-width: 375px;
    margin: 2rem auto;
    border: 8px solid #333;
    border-radius: 30px;
    padding: 1rem;
    background: white;
}

.wf-tablet-frame {
    max-width: 768px;
    margin: 2rem auto;
    border: 6px solid #333;
    border-radius: 20px;
    padding: 1.5rem;
    background: white;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.wf-flex {
    display: flex;
    gap: 1rem;
}

.wf-flex-center {
    align-items: center;
    justify-content: center;
}

.wf-flex-between {
    justify-content: space-between;
    align-items: center;
}

.wf-mt-1 { margin-top: 1rem; }
.wf-mt-2 { margin-top: 2rem; }
.wf-mb-1 { margin-bottom: 1rem; }
.wf-mb-2 { margin-bottom: 2rem; }

.wf-p-1 { padding: 1rem; }
.wf-p-2 { padding: 2rem; }

.wf-text-center { text-align: center; }
.wf-text-muted { color: #666; }
.wf-text-small { font-size: 0.875rem; }

.wf-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #E0E0E0;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.wf-badge.success { background: #C8E6C9; color: #2E7D32; }
.wf-badge.warning { background: #FFF9C4; color: #F57C00; }
.wf-badge.danger { background: #FFCDD2; color: #C62828; }
.wf-badge.info { background: #BBDEFB; color: #1976D2; }

/* ===================================
   INTERACTION STATES
   =================================== */

.wf-loading {
    border: 2px dashed #999;
    padding: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

.wf-error {
    background: #FFEBEE;
    border: 2px solid #F44336;
    padding: 1rem;
    border-radius: 4px;
    color: #C62828;
}

.wf-success {
    background: #E8F5E9;
    border: 2px solid #4CAF50;
    padding: 1rem;
    border-radius: 4px;
    color: #2E7D32;
}

/* ===================================
   RESPONSIVE HELPERS
   =================================== */

/* Tablet and below */
@media (max-width: 768px) {
    .wireframe-container {
        padding: 1rem;
    }
    
    .wf-grid-4,
    .wf-grid-3,
    .wf-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .wf-screen {
        padding: 0.75rem;
    }
    
    .wf-topbar {
        padding: 0.5rem;
    }
    
    .wireframe-header h1 {
        font-size: 1.5rem;
    }
}

/* iPhone and Small Mobile */
@media (max-width: 480px) {
    body {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .wireframe-container {
        padding: 0.5rem;
    }
    
    .wireframe-header {
        padding: 1rem;
    }
    
    .wireframe-header h1 {
        font-size: 1.25rem;
    }
    
    .wireframe-header .module-name {
        font-size: 1rem;
    }
    
    .wireframe-section {
        padding: 1rem;
    }
    
    .wireframe-section h2 {
        font-size: 1.1rem;
    }
    
    .wf-screen {
        padding: 0.5rem;
        border-width: 2px;
    }
    
    .wf-topbar {
        height: 40px;
        padding: 0.5rem;
    }
    
    .wf-button {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .wf-card {
        padding: 0.75rem;
    }
    
    .wf-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .wf-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .wf-tab {
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
    
    .wf-mobile-frame {
        max-width: 100%;
        border-width: 4px;
        border-radius: 20px;
        padding: 0.75rem;
    }
    
    .wf-table {
        font-size: 0.875rem;
    }
    
    .wf-table th,
    .wf-table td {
        padding: 0.5rem;
    }
    
    .wireframe-note {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

@media print {
    .wireframe-container {
        max-width: 100%;
    }
    
    .wireframe-nav,
    .module-nav {
        display: none;
    }
}
