/* ===== Photo Wall tool dedicated styles ===== */

.main-content .tool-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 24px 28px;
    margin-bottom: 24px;
}

.main-content .tool-section h3 {
    margin: 0 0 18px;
    font-size: 1.15rem;
    color: #1f2937;
}

/* Upload area (reuses the home page .upload-area look, with extra details here) */
.upload-area {
    border: 3px dashed #3b82f6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f0f7ff;
}

.upload-area:hover {
    border-color: #2563eb;
    background: #e6f0ff;
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #e8f5e8;
}

.upload-area .upload-icon {
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

.upload-area p {
    margin: 8px 0 0;
}

.upload-hint {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Control panel */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px 24px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-item label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.control-item input[type="range"] {
    width: 100%;
    accent-color: #3b82f6;
}

.control-item select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
}

.bg-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bg-row input[type="color"] {
    width: 48px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

#qualityWrap.disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* Overlay settings */
.mask-control .checkbox-inline {
    font-weight: 600;
}

.mask-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
    padding: 12px 14px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    background: #fafafa;
}

.mask-options.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.mask-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mask-row label {
    font-weight: 500;
}

.mask-row input[type="color"] {
    width: 44px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.mask-options input[type="range"] {
    width: 100%;
    accent-color: #3b82f6;
}

/* Overlay layer in preview */
.wall-mask {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

/* Gradient direction dial */
.angle-row {
    align-items: center;
    gap: 12px;
}

.angle-dial {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    background:
        radial-gradient(circle at center, #dbeafe 0 2px, transparent 3px),
        #eef4ff;
    cursor: grab;
    flex: 0 0 auto;
    touch-action: none;
}

.angle-dial:active {
    cursor: grabbing;
}

.angle-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    pointer-events: none;
    left: 50%;
    top: 6px;
}

.angle-label {
    font-size: 0.85rem;
    color: #374151;
}

/* Preview wall */
.wall-holder {
    position: relative;
    width: 100%;
    min-height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background:
        linear-gradient(45deg, #eee 25%, transparent 25%) 0 0 / 20px 20px,
        linear-gradient(-45deg, #eee 25%, transparent 25%) 0 10px / 20px 20px,
        linear-gradient(45deg, transparent 75%, #eee 75%) 10px -10px / 20px 20px,
        linear-gradient(-45deg, transparent 75%, #eee 75%) -10px 0 / 20px 20px,
        #f5f5f5;
    border: 1px solid #e5e7eb;
}

.wall-canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
}

.tile {
    position: absolute;
    object-fit: cover;
    display: block;
}

.wall-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9ca3af;
    font-size: 0.95rem;
    text-align: center;
    width: 90%;
}

.wall-stats {
    margin: 14px 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Buttons */
.tool-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

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

@media (max-width: 640px) {
    .main-content .tool-section {
        padding: 18px 16px;
    }
}

/* How to use */
.how-to-steps {
    margin: 0;
    padding-left: 22px;
    color: #374151;
    line-height: 1.7;
}

.how-to-steps li {
    margin-bottom: 10px;
}

.how-to-steps strong {
    color: #1f2937;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    padding: 0 16px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    padding: 14px 0;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] summary {
    border-bottom: 1px solid #e5e7eb;
}

.faq-item p {
    margin: 14px 0;
    color: #4b5563;
    line-height: 1.7;
}
