/* FoxTag Kiosk POC Styles */
:root {
    --color-black: #000000;
    --color-cream: #f9f8e6;
    --color-turquoise: #50efde;
    --color-orange: #fb7634;
    --color-white: #ffffff;
    --color-gray-light: #f5f5f5;
    --color-gray-medium: #888888;
    --color-gray-dark: #333333;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 8px 40px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--color-cream) 0%, #ffffff 100%);
    color: var(--color-black);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--color-white);
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 60px;
    width: auto;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-black);
    margin: 0;
}

.tagline p {
    color: var(--color-gray-medium);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Info Section */
.info-section {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.info-section h2 {
    font-size: 2.2rem;
    color: var(--color-black);
    margin-bottom: 20px;
    font-weight: 600;
}

.info-section p {
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    margin-bottom: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Kiosk Section */
.kiosk-section {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.kiosk-frame {
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border-radius: 25px;
    padding: 25px;
    box-shadow: var(--shadow-large);
    max-width: 900px;
    width: 100%;
    position: relative;
}

.kiosk-frame::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, var(--color-turquoise), var(--color-orange));
    border-radius: 30px;
    z-index: -1;
}

.kiosk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--color-black);
    border-radius: 15px;
    margin-bottom: 20px;
}

.kiosk-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kiosk-logo-img {
    height: 35px;
    width: auto;
}

.kiosk-brand {
    color: var(--color-turquoise);
    font-size: 1.5rem;
    font-weight: 700;
}

.status-indicator {
    color: var(--color-white);
    font-size: 0.9rem;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.kiosk-screen {
    background: var(--color-cream);
    border-radius: 15px;
    padding: 30px;
    min-height: 600px;
}

.kiosk-footer {
    text-align: center;
    padding: 15px;
    color: var(--color-gray-light);
    font-size: 0.9rem;
}

/* Step Sections */
.step-section {
    margin-bottom: 30px;
}

.step-section h3 {
    color: var(--color-black);
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Label Selection */
.label-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.label-option {
    background: var(--color-white);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.label-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.label-option.active {
    border-color: var(--color-turquoise);
    background: rgba(80, 239, 222, 0.05);
}

.label-preview {
    margin: 0 auto 10px;
    background: var(--color-white);
    border: 2px solid var(--color-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.label-preview::after {
    content: 'QR';
    font-size: 0.7rem;
    color: var(--color-gray-medium);
    font-weight: 600;
}

/* Label Preview Shapes */
.rectangle-50x80 {
    width: 60px;
    height: 95px;
    border-radius: 4px;
}

.square-50x50 {
    width: 70px;
    height: 70px;
    border-radius: 4px;
}

.circle-34x34 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.rectangle-3x2 {
    width: 80px;
    height: 55px;
    border-radius: 4px;
}

.label-name {
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    font-weight: 500;
    line-height: 1.3;
}

/* Mode Selection */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.mode-option {
    background: var(--color-white);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mode-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mode-option.active {
    border-color: var(--color-turquoise);
    background: rgba(80, 239, 222, 0.05);
}

.mode-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.mode-name {
    font-size: 1rem;
    color: var(--color-gray-dark);
    font-weight: 600;
    line-height: 1.2;
}

.mode-option small {
    font-size: 0.8rem;
    color: var(--color-gray-medium);
    font-weight: 400;
}

/* Content Input Modes */
.input-mode {
    display: none;
}

.input-mode.active {
    display: block;
}

/* Show QR input by default before JS loads */
#qrInput {
    display: block;
}

/* File Upload */
.file-upload-area {
    position: relative;
    margin-bottom: 15px;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 20px;
    border: 2px dashed var(--color-gray-light);
    border-radius: var(--border-radius);
    background: var(--color-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: var(--color-turquoise);
    background: rgba(80, 239, 222, 0.05);
}

.file-upload-label.has-file {
    border-color: var(--color-turquoise);
    background: rgba(80, 239, 222, 0.05);
}

.upload-icon {
    font-size: 2rem;
    color: var(--color-gray-medium);
}

.upload-text {
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    font-weight: 500;
}

.file-upload-label small {
    color: var(--color-gray-medium);
    font-size: 0.9rem;
}

.file-info {
    margin-top: 10px;
    padding: 10px;
    background: var(--color-gray-light);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

/* Caption Input */
.caption-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    background: var(--color-white);
    transition: border-color 0.3s ease;
    font-family: var(--font-family);
}

.caption-input:focus {
    outline: none;
    border-color: var(--color-turquoise);
    box-shadow: 0 0 0 3px rgba(80, 239, 222, 0.1);
}

.caption-validation {
    margin-top: 8px;
    font-size: 0.9rem;
    min-height: 16px;
    color: var(--color-gray-medium);
}

/* Text Area Input */
.text-input {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    background: var(--color-white);
    transition: border-color 0.3s ease;
    font-family: var(--font-family);
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.text-input:focus {
    outline: none;
    border-color: var(--color-turquoise);
    box-shadow: 0 0 0 3px rgba(80, 239, 222, 0.1);
}

.text-validation {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.char-count {
    color: var(--color-gray-medium);
    font-weight: 500;
}

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

.char-count.limit {
    color: #ef4444;
}

/* URL Input */
.url-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    background: var(--color-white);
    transition: border-color 0.3s ease;
    font-family: var(--font-family);
}

.url-input:focus {
    outline: none;
    border-color: var(--color-turquoise);
    box-shadow: 0 0 0 3px rgba(80, 239, 222, 0.1);
}

.url-validation {
    margin-top: 10px;
    font-size: 0.9rem;
    min-height: 20px;
}

.url-validation.valid {
    color: #22c55e;
}

.url-validation.invalid {
    color: #ef4444;
}

/* Print Preview */
.preview-container {
    display: flex;
    align-items: center;
    gap: 30px;
    background: var(--color-white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.preview-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--color-gray-light);
    border-radius: var(--border-radius);
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.threshold-control input[type="range"] {
    flex: 1;
    max-width: 200px;
}

.threshold-control span:last-of-type {
    min-width: 30px;
    font-weight: 600;
    color: var(--color-orange);
}

.threshold-control small {
    color: var(--color-gray-medium);
    font-style: italic;
}

.preview-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.preview-canvas {
    border: 2px solid var(--color-gray-light);
    border-radius: 8px;
    background: var(--color-white);
    max-width: 800px;
    margin: 0 auto;
    height: auto;
    filter: saturate(0);
}

.preview-info {
    flex: 1;
}

.preview-info p {
    color: var(--color-gray-medium);
    font-size: 1rem;
}

/* Print Button */
.print-section {
    text-align: center;
    margin: 30px 0;
}

.print-btn {
    background: linear-gradient(135deg, var(--color-turquoise), var(--color-orange));
    color: var(--color-white);
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    font-family: var(--font-family);
}

.print-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.print-btn:disabled {
    background: var(--color-gray-light);
    color: var(--color-gray-medium);
    cursor: not-allowed;
    transform: none;
}

.print-btn.secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    border: 2px solid #6c757d;
}

.print-btn.secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268, #3d4043);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 117, 125, 0.4);
}

.btn-icon {
    font-size: 1.3rem;
}

/* Progress Section */
.progress-section {
    background: var(--color-white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--color-gray-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-turquoise), var(--color-orange));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.progress-header .progress-bar {
    flex: 1;
    margin-bottom: 0;
}

.clear-btn {
    background: var(--color-orange);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background: #e56528;
}

.progress-status {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    font-weight: 500;
    margin-bottom: 20px;
}

/* Debug Section */
.debug-section {
    border-top: 1px solid var(--color-gray-light);
    padding-top: 20px;
}

.debug-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-gray-medium);
    margin-bottom: 15px;
}

.debug-toggle input[type="checkbox"] {
    accent-color: var(--color-turquoise);
}

.debug-logs {
    background: var(--color-black);
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.4;
}

.debug-logs .log-entry {
    margin-bottom: 5px;
}

.debug-logs .log-timestamp {
    color: var(--color-gray-medium);
}

/* Tech Info */
.tech-info {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.tech-info h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--color-black);
    margin-bottom: 30px;
    font-weight: 600;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tech-item {
    text-align: center;
    padding: 20px;
    background: var(--color-cream);
    border-radius: var(--border-radius);
}

.tech-item h4 {
    color: var(--color-black);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.tech-item p {
    color: var(--color-gray-dark);
    font-size: 1rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer p {
    margin-bottom: 5px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .kiosk-frame {
        margin: 0 10px;
        padding: 20px;
    }
    
    .kiosk-screen {
        padding: 20px;
    }
    
    .preview-container {
        flex-direction: column;
        text-align: center;
    }
    
    .label-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 45px;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .kiosk-frame {
        margin: 0 5px;
        padding: 15px;
    }
    
    .print-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
