/* Tool Specific Layout */

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 800px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

/* Card overrides */
.card {
    /* Base styles inherited from style.css */
    gap: 24px;
    height: auto;
    justify-content: flex-start;
    /* override bento grid height if needed */
}

.card-header {
    /* Override global .card-header which is row-based */
    display: block;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 20px;
    margin-bottom: -8px;
}

.card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.card-header span {
    display: block;
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Inputs */
.field-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

textarea,
input[type="text"],
select {
    width: 100%;
    border-radius: var(--radius-small);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    padding: 16px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: all 0.2s;
}

textarea:focus,
input:focus,
select:focus {
    background: var(--input-bg-focus);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.15);
}

/* Options Row */
.options-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.color-input {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 99px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tag-bg);
    color: var(--text-main);
}

.btn:hover:not(:disabled) {
    background: var(--input-border);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(94, 92, 230, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-ghost {
    background: transparent;
    color: var(--accent-color);
}

.btn-ghost:hover {
    background: rgba(94, 92, 230, 0.05);
}

/* Preview Areas */
.qr-preview-shell {
    background: var(--card-bg);
    border: 1px dashed var(--dropzone-border);
    border-radius: var(--radius-small);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.qr-placeholder {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#qrPreview img,
#qrPreview canvas {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Dropzone */


.status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--input-border);
}

.status-dot.active {
    background: var(--success-color);
}

.status-dot.error {
    background: var(--error-color);
}

/* Footer */
.footer-note {
    text-align: center;
    margin-top: 40px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Layout Optimizations */
@media (max-width: 640px) {
    .app-shell {
        padding-left: 0;
        padding-right: 0;
        padding-top: 20px;
    }

    .tool-container {
        padding: 0;
        max-width: 100% !important;
    }

    .card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 20px !important;
    }

    .guide-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-top: 24px;
    }

    .hero-compact {
        margin-bottom: 4px !important;
        padding: 0;
    }

    .hero-compact h1 {
        font-size: 1.75rem;
        margin-bottom: 6px;
        padding: 0 16px;
    }

    .hero-compact p {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 0 16px;
    }
}