/* EDVC Mapper - Responsive Styles */

/* Mobile Portrait (320px - 479px) */
@media (max-width: 479px) {
    .edvc-start-content {
        padding: 1rem;
    }
    
    .edvc-logo {
        width: 60px;
        margin-bottom: 0.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .edvc-start-options {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .edvc-start-option {
        padding: 0.5rem;
    }
	.edvc-start-option h3 {
		margin-bottom: 0rem;
		margin-top: 0px;
		font-size: 14pt;
	}
    
    .edvc-option-icon {
        width: auto;
        height: auto;
		margin-bottom: 0px;
    }
    
    .edvc-option-icon img {
        width: 48px;
        height: 48px;
    }
}

/* Mobile Landscape (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .edvc-start-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .edvc-canvas {
        padding: 1.5rem;
    }
    
    .edvc-card-row {
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .edvc-start-options {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Card Layout for Tablets */
    .edvc-card {
        min-width: 240px;
        max-width: 280px;
    }
    
    .edvc-card-title {
        font-size: 15px;
    }
    
    .edvc-evaluation-icons img {
        width: 30px;
        height: 30px;
    }
    
    /* Edit Mode adjustments */
    .edvc-card-edit-content {
        max-width: 700px;
    }
    
    .edvc-two-column {
        grid-template-columns: 180px 1fr;
        gap: 1.5rem;
    }
}

/* Tablet Landscape (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .edvc-start-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
	
	.edvc-canvas {
        padding: 2.5rem;
    }
    
    .edvc-card-row {
        gap: 2.5rem;
        margin-bottom: 3.5rem;
    }
    
    .edvc-card {
        min-width: 260px;
        max-width: 300px;
    }
}

/* Desktop (1440px - 1919px) */
@media (min-width: 1440px) and (max-width: 1919px) {
    .edvc-start-content {
        max-width: 1000px;
    }
    
    .edvc-canvas {
        padding: 2.5rem;
    }
    
    .edvc-card-row {
        gap: 2.5rem;
    }
    
    .edvc-card {
        min-width: 300px;
        max-width: 340px;
    }
}

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .edvc-start-content {
        max-width: 1200px;
        padding: 3rem;
    }
    
    .edvc-logo {
        width: 100px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .edvc-start-options {
        gap: 3rem;
        margin: 4rem 0;
    }
    
    .edvc-start-option {
        padding: 2rem;
    }
    
    .edvc-canvas {
        padding: 4rem;
    }
    
    .edvc-card-row {
        gap: 3rem;
        margin-bottom: 4rem;
    }
    
    .edvc-card {
        min-width: 340px;
        max-width: 400px;
        padding: 2rem;
    }
    
    .edvc-card-title {
        font-size: 18px;
    }
    
    .edvc-evaluation-icons img {
        width: 36px;
        height: 36px;
    }
    
    .edvc-count {
        font-size: 28px;
    }
}

/* Ultra-wide (2560px+) */
@media (min-width: 2560px) {
    .edvc-start-content {
        max-width: 1400px;
    }
    
    .edvc-canvas {
        padding: 5rem;
    }
    
    .edvc-card-row {
        gap: 4rem;
        margin-bottom: 5rem;
    }
    
    .edvc-card {
        min-width: 380px;
        max-width: 450px;
        padding: 2.5rem;
    }
    
    .edvc-card-title {
        font-size: 20px;
    }
    
    .edvc-evaluation-icons {
        gap: 1.5rem;
    }
    
    .edvc-evaluation-icons img {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Orientation Specific */
@media (max-width: 767px) and (orientation: landscape) {
    .edvc-navbar {
        height: 50px;
    }
    
    .edvc-phases-container {
        min-height: 40px;
    }
    
    .edvc-phase-tab {
        padding: 0.4rem 0.6rem;
        font-size: 10px;
    }
    
    /* Horizontal card layout for mobile landscape */
    .edvc-card-row {
        flex-direction: row;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 1rem;
    }
    
    .edvc-card {
        min-width: 220px;
        max-width: 220px;
        flex-shrink: 0;
    }
    
    .edvc-card-image {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 50px;
        height: 50px;
        margin: 0 auto 0.5rem;
    }
}

@media (max-width: 767px) and (orientation: portrait) {
    /* Vertical card layout for mobile portrait */
    .edvc-card-row {
        flex-direction: column;
        align-items: center;
    }
    
    .edvc-card {
        width: 100%;
        max-width: 300px;
    }
    
    /* Image positioning for mobile portrait */
    .edvc-card-image {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 60px;
        height: 60px;
        margin: 0 auto 1rem;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .edvc-card {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }
    
    .edvc-card:hover {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }
    
    .edvc-navbar {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .edvc-card {
        transition: none;
    }
    
    .edvc-tutorial-popup {
        animation: none;
    }
    
    .edvc-tutorial-highlight {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --edvc-highlight: #0056b3;
        --edvc-warning: #b30000;
        --edvc-text-primary: #000000;
        --edvc-text-secondary: #333333;
        --edvc-border-radius: 2px;
    }
    
    .edvc-card {
        border: 2px solid var(--edvc-text-secondary);
    }
    
    .edvc-btn-primary,
    .edvc-btn-secondary {
        border: 2px solid currentColor;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --edvc-bg-map: #1a1a1a;
        --edvc-bg-navbar: #2d2d2d;
        --edvc-card-bg: #2d2d2d;
        --edvc-text-primary: #ffffff;
        --edvc-text-secondary: #b0b0b0;
        --edvc-text-placeholder: #666666;
    }
    
    .edvc-card {
        border: 1px solid #404040;
    }
    
    .edvc-pain-point {
        background-color: #3d3520;
        border-left-color: #e6b800;
    }
    
    .edvc-idea {
        background-color: #1e3a28;
        border-left-color: #20a03a;
    }
}

/* Touch Device Optimizations */
@media (pointer: coarse) {
    /* Larger touch targets */
    .edvc-tool-btn {
        width: 44px;
        height: 44px;
        padding: 0.75rem;
    }
    
    .edvc-rating-btn {
        padding: 0.75rem;
    }
    
    .edvc-rating-btn img {
        width: 36px;
        height: 36px;
    }
    
    .edvc-phase-tab {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .edvc-menu-item {
        padding: 1.25rem;
    }
    
    /* Remove hover states for touch devices */
    .edvc-card:hover {
        transform: none;
        box-shadow: var(--edvc-shadow);
    }
    
    .edvc-start-option:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .edvc-start-screen {
        display: none !important;
    }
    
    .edvc-navbar,
    .edvc-phases-container,
    .edvc-main-menu,
    .edvc-tutorial-popup,
    .edvc-mapping-tools,
    .edvc-branch-btn {
        display: none !important;
    }
    
    .edvc-main-interface {
        height: auto !important;
    }
    
    .edvc-canvas-container {
        overflow: visible !important;
        height: auto !important;
    }
    
    .edvc-canvas {
        position: static !important;
        transform: none !important;
        padding: 1rem !important;
    }
    
    .edvc-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .edvc-card-row {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
}