/**
 * Tool Common Styles
 * 모든 툴 페이지에서 공통으로 사용하는 스타일
 *
 * @package Zipper
 */

/* ========================================
   Tool Section Base
   ======================================== */

.tool-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.tool-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-section-title i {
    color: #d4af37;
    font-size: 18px;
}

/* ========================================
   Tool Input Section
   ======================================== */

.tool-input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.tool-input-group label .required {
    color: #dc3232;
}

.tool-input-group input,
.tool-input-group select,
.tool-input-group textarea {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-input-group input:focus,
.tool-input-group select:focus,
.tool-input-group textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.tool-input-group input::placeholder,
.tool-input-group textarea::placeholder {
    color: #5f5a56;
}

.tool-input-row {
    display: flex;
    gap: 16px;
}

.tool-input-row .tool-input-group {
    flex: 1;
}

/* ========================================
   Tool Result Section
   ======================================== */

.tool-result-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-result-box {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.tool-result-box.highlight {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(184, 134, 11, 0.08) 100%);
    border-color: rgba(212, 175, 55, 0.3);
}

.tool-result-label {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 8px;
}

.tool-result-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.2;
}

.tool-result-value.gold {
    color: #d4af37;
}

.tool-result-value .unit {
    font-size: 18px;
    font-weight: 500;
    color: #5f5a56;
    margin-left: 4px;
}

.tool-result-sub {
    font-size: 14px;
    color: #5f5a56;
    margin-top: 8px;
}

.tool-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.tool-result-grid .tool-result-box {
    padding: 16px;
}

.tool-result-grid .tool-result-value {
    font-size: 24px;
}

/* ========================================
   Tool Actions (Buttons)
   ======================================== */

.tool-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tool-actions.center {
    justify-content: center;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-btn i {
    font-size: 16px;
}

.tool-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
}

.tool-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.tool-btn-primary:active {
    transform: translateY(0);
}

.tool-btn-secondary {
    color: #2d2a26;
    background: #fff;
    border: 1px solid #e8e4dc;
}

.tool-btn-secondary:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.tool-btn-copy,
.tool-btn-reset {
    padding: 10px 16px;
    font-size: 14px;
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   Tool Info/Description Sections
   ======================================== */

.tool-description {
    margin-top: 32px;
}

.tool-description section {
    margin-bottom: 32px;
    scroll-margin-top: 80px; /* content-header 가림 방지 */
}

.tool-description h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e4dc;
}

.tool-description h3 {
    font-size: 17px;
    font-weight: 600;
    color: #2d2a26;
    margin: 20px 0 12px;
}

.tool-description p {
    font-size: 15px;
    line-height: 1.7;
    color: #4a4640;
    margin-bottom: 12px;
}

.tool-description ul,
.tool-description ol {
    margin: 12px 0;
    padding-left: 24px;
}

.tool-description li {
    font-size: 15px;
    line-height: 1.7;
    color: #4a4640;
    margin-bottom: 8px;
}

/* ========================================
   FAQ Section (Schema.org FAQPage)
   ======================================== */

#faq {
    margin-top: 32px;
}

#faq h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e4dc;
}

#faq [itemtype="https://schema.org/Question"] {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

#faq [itemprop="name"] {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    padding: 16px 20px;
    margin: 0;
    background: #faf9f7;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

#faq [itemprop="name"]::before {
    content: "Q";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    flex-shrink: 0;
}

#faq [itemprop="text"] {
    padding: 16px 20px 16px 56px;
}

#faq [itemprop="text"] p {
    font-size: 15px;
    line-height: 1.7;
    color: #4a4640;
    margin: 0;
}

/* ========================================
   Tool Tips/Notes
   ======================================== */

.tool-tip {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 10px;
    margin-top: 16px;
}

.tool-tip i {
    color: #d4af37;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tool-tip p {
    font-size: 14px;
    line-height: 1.6;
    color: #4a4640;
    margin: 0;
}

.tool-note {
    font-size: 13px;
    color: #5f5a56;
    margin-top: 8px;
}

/* ========================================
   Tool Toast Notification
   ======================================== */

.tool-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: #2d2a26;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

.tool-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tool-toast i {
    font-size: 18px;
}

.tool-toast.success {
    background: #2d2a26;
}

.tool-toast.success i {
    color: #46b450;
}

.tool-toast.error {
    background: #2d2a26;
}

.tool-toast.error i {
    color: #dc3232;
}

.tool-toast.info i {
    color: #d4af37;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .tool-section {
        padding: 20px 16px;
    }

    .tool-input-row {
        flex-direction: column;
    }

    .tool-result-value {
        font-size: 28px;
    }

    .tool-result-grid .tool-result-value {
        font-size: 20px;
    }

    .tool-actions {
        flex-direction: column;
    }

    .tool-btn {
        width: 100%;
    }

    .tool-description h2 {
        font-size: 18px;
    }

    #faq [itemprop="text"] {
        padding-left: 20px;
    }

    .tool-toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(20px);
        bottom: 16px;
    }

    .tool-toast.is-visible {
        transform: translateX(0) translateY(0);
    }
}
