/* Tool Container */
.tool-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Common Card Style (Inherited Structure) */
.input-card {
    background-color: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease-out;
}

/* Upload Area Styling */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-body);
    transition: all 0.2s;
}

.upload-area:active {
    background-color: var(--primary-light);
    border-color: var(--primary-blue);
}

.upload-icon {
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.upload-area p {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.file-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Preview Section */
.preview-wrapper {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    background-color: var(--bg-body);
    padding: 10px;
    border-radius: var(--radius-md);
}

#imagePreview {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

.size-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Inputs Grid */
.dimensions-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-blue);
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.checkbox-wrapper label {
    color: var(--text-main);
    font-size: 0.95rem;
    cursor: pointer;
}

.checkbox-wrapper input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

/* Buttons (Reusing Main Classes) */
.primary-btn {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: transform 0.1s;
}

.primary-btn:active {
    transform: scale(0.98);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

/* Modal Styling (Same as QR) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--bg-surface); width: 100%; max-width: 400px;
    border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow-floating);
}
.modal-header { display: flex; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { color: var(--text-main); margin: 0; }
.modal-body p { color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }

/* Utility */
.hidden { display: none !important; }
.full-width { width: 100%; }

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