/* 이미지 압축기 전용 스타일 */
/* 공통 style.css 이후에 로드됨 */

/* 메인 카드 레이아웃 약간 조정 */
.image-tool-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 업로드 영역 */
.upload-wrapper {
    margin-bottom: 4px;
}

.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 28px 16px;
    text-align: center;
    background: #f9fafb;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.drop-zone.dragover {
    background: #eef2ff;
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.drop-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.drop-help {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

/* 버튼 */
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: #4f46e5;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.primary-btn:disabled {
    background: #9ca3af;
    cursor: default;
    box-shadow: none;
    transform: none;
}

.primary-btn:not(:disabled):hover {
    background: #4338ca;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    transform: translateY(-1px);
}

/* 옵션 카드 */
.options-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px 16px 18px;
    background: #ffffff;
}

.options-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.options-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 14px 20px;
    margin-bottom: 14px;
}

.option-item label {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#quality-range {
    flex: 1;
}

#quality-value {
    font-size: 13px;
    min-width: 40px;
    text-align: right;
}

.option-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* 사이즈 입력 */
.size-row {
    display: flex;
    gap: 10px;
}

.size-row > div {
    flex: 1;
}

.size-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 3px;
}

.size-row input {
    width: 100%;
}

/* 결과 카드 */
.result-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px 16px 18px;
    background: #ffffff;
}

.result-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

#result-summary {
    color: #6b7280;
}

/* 이미지 리스트 */
.image-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1.4fr) auto;
    gap: 10px 12px;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    align-items: center;
}

.image-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.image-info-main {
    font-size: 13px;
}

.image-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.image-meta {
    font-size: 12px;
    color: #6b7280;
}

.image-meta span + span::before {
    content: " · ";
    margin: 0 3px;
}

.image-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.compress-badge {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.download-btn {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    background: #111827;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.download-btn:hover {
    background: #020617;
}

/* info / faq (날짜 계산기와 동일 구조) */
.info-section,
.faq-section {
    max-width: 720px;
    margin: 40px auto 0;
    padding: 0 16px;
}

.info-section h2,
.faq-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.info-section p {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #444;
    font-size: 14px;
}

/* bullet 리스트 */
.info-list {
    margin: 8px 0 14px;
    padding-left: 18px;
    font-size: 14px;
    color: #444;
}

.info-list li {
    margin-bottom: 3px;
}

/* FAQ 리스트 */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 0;
}

/* 전역 button 스타일 덮어쓰기 */
.faq-question {
    position: relative;
    width: 100%;
    background: #f9fafb;
    border: none;
    text-align: left;
    padding: 10px 12px 10px 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    color: #111827;
    border-radius: 8px;
}

/* 화살표 아이콘 */
.faq-question::before {
    content: "▶";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #6b7280;
}

.faq-item.active .faq-question::before {
    content: "▼";
}

.faq-question:hover {
    background: #eef2ff;
}

.faq-question:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.faq-answer {
    display: none;
    padding: 6px 2px 12px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    display: block;
}

/* 이 페이지에서만 footer 간격 조금 더 주기 */
.page-wrapper .footer-text {
    margin-top: 28px;
}

/* 모바일 조정 */
@media (max-width: 800px) {
    .options-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .image-item {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .image-actions {
        grid-column: 1 / -1;
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .info-section,
    .faq-section {
        margin-top: 32px;
        padding: 0 12px;
    }

    .info-section h2,
    .faq-section h2 {
        font-size: 20px;
    }

    .faq-question {
        font-size: 14px;
        padding: 9px 10px 9px 28px;
    }

    .info-section p,
    .faq-answer,
    .info-list {
        font-size: 13px;
    }
}
