/* Game Boy Printer 3D - Embeddable App Styles */
/* All styles are namespaced under .gameboy-printer-3d to prevent conflicts */

.gameboy-printer-3d {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    box-sizing: border-box;
}

.gameboy-printer-3d *,
.gameboy-printer-3d *::before,
.gameboy-printer-3d *::after {
    box-sizing: border-box;
}

/* App Container */
.gameboy-printer-3d .app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Main Content */
.gameboy-printer-3d .main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Combined App Content Container */
.gameboy-printer-3d .app-content-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Embedded Header */
.gameboy-printer-3d .embedded-header {
    text-align: center;
    margin-bottom: 25px;
}

.gameboy-printer-3d .embedded-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.gameboy-printer-3d .embedded-header p {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0;
}

/* Drag & Drop Zone */
.gameboy-printer-3d .drop-zone {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gameboy-printer-3d .drop-zone.drag-over {
    border-color: #3498db;
    background-color: #ebf3fd;
    transform: scale(1.02);
}

.gameboy-printer-3d .preview-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gameboy-printer-3d .image-preview {
    max-width: 100%;
    max-height: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.gameboy-printer-3d .drop-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.gameboy-printer-3d .drop-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.gameboy-printer-3d .drop-text h3 {
    font-size: 1.2rem;
    color: #34495e;
    margin: 0 0 5px 0;
}

.gameboy-printer-3d .drop-text p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

/* Frame Selection */
.gameboy-printer-3d .frame-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 0 30px 0;
    border-bottom: 1px solid #eee;
}

.gameboy-printer-3d .frame-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
}

.gameboy-printer-3d .frame-dropdown {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: #333;
    min-width: 180px;
    cursor: pointer;
}

.gameboy-printer-3d .frame-dropdown:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.gameboy-printer-3d .frame-dropdown:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.gameboy-printer-3d .frame-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gameboy-printer-3d .frame-nav-button {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
}

.gameboy-printer-3d .frame-nav-button:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.gameboy-printer-3d .frame-nav-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Controls Section */
.gameboy-printer-3d .controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gameboy-printer-3d .control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gameboy-printer-3d .control-group label {
    font-weight: 500;
    color: #2c3e50;
}

.gameboy-printer-3d .output-size-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gameboy-printer-3d .control-group input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 80px;
    font-family: inherit;
}

.gameboy-printer-3d .final-size {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-left: auto;
}

/* Sliders Row */
.gameboy-printer-3d .sliders-row {
    display: flex;
    gap: 30px;
    justify-content: space-between;
}

.gameboy-printer-3d .slider-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gameboy-printer-3d .slider-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
}

.gameboy-printer-3d .slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.gameboy-printer-3d .slider-container input[type="range"] {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.gameboy-printer-3d .slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gameboy-printer-3d .slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gameboy-printer-3d .slider-value {
    font-size: 0.8rem;
    color: #7f8c8d;
    min-width: 50px;
    text-align: center;
}

/* Segmented Control */
.gameboy-printer-3d .control-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 8px;
}

.gameboy-printer-3d .segmented-control {
    display: flex;
    background: #ecf0f1;
    border-radius: 8px;
    padding: 2px;
}

.gameboy-printer-3d .segmented-control input[type="radio"] {
    display: none;
}

.gameboy-printer-3d .segment-label {
    flex: 1;
    padding: 8px 16px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.gameboy-printer-3d .segmented-control input[type="radio"]:checked + .segment-label {
    background: white;
    color: #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Export Button */
.gameboy-printer-3d .export-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center;
    font-family: inherit;
}

.gameboy-printer-3d .export-button:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.gameboy-printer-3d .export-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.gameboy-printer-3d .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gameboy-printer-3d .modal-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.gameboy-printer-3d .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.gameboy-printer-3d .modal-header h3 {
    color: #e74c3c;
    font-size: 1.1rem;
    margin: 0;
}

.gameboy-printer-3d .close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #bdc3c7;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.gameboy-printer-3d .close-button:hover {
    color: #7f8c8d;
}

.gameboy-printer-3d .modal-body {
    padding: 20px;
}

.gameboy-printer-3d .modal-body p {
    margin: 0;
}

.gameboy-printer-3d .modal-footer {
    padding: 20px;
    text-align: right;
    border-top: 1px solid #eee;
}

.gameboy-printer-3d .modal-ok-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
}

.gameboy-printer-3d .modal-ok-button:hover {
    background: #2980b9;
}

/* Utility Classes */
.gameboy-printer-3d .hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 600px) {
    .gameboy-printer-3d .app-container {
        padding: 15px;
    }

    .gameboy-printer-3d .sliders-row {
        flex-direction: column;
        gap: 20px;
    }

    .gameboy-printer-3d .slider-container input[type="range"] {
        width: 200px;
    }

    .gameboy-printer-3d .drop-zone {
        min-height: 250px;
        padding: 15px;
    }

    .gameboy-printer-3d .embedded-header h1 {
        font-size: 1.5rem;
    }

    .gameboy-printer-3d .output-size-row {
        justify-content: center;
    }

    .gameboy-printer-3d .final-size {
        margin-left: 0;
        margin-top: 8px;
    }
}
