/**
 * Web Analytics Component Styles
 * Version: 1.0
 * Description: Common styles for web analytics calculation tools
 * Used by: NewSessionRatio, PageExitRatio, RevenuePerVisit
 */

/* ========================================
   Use Cases Section
   ======================================== */
.usecases-section h3 {
    color: var(--primary-color);
    font-size: 1.1em;
    margin-top: 24px;
    margin-bottom: 8px;
}

.usecases-section h3:first-of-type {
    margin-top: 12px;
}

.usecases-section p {
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ========================================
   What Is Section
   ======================================== */
.what-is-section h3 {
    color: var(--primary-color);
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 8px;
}

.what-is-section p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* ========================================
   Benefits Section
   ======================================== */
.benefits-list {
    margin-left: 20px;
    margin-top: 12px;
}

.benefits-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ========================================
   Formula Section
   ======================================== */
.formula-box {
    background-color: var(--gray-100);
    padding: 16px;
    border-radius: 4px;
    margin: 16px 0;
}

.formula-box code {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--gray-900);
}

.formula-section h3 {
    color: var(--primary-color);
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 8px;
}

.formula-section p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
}

.faq-item:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.faq-question {
    color: var(--primary-color);
    font-size: 1em;
    margin-bottom: 8px;
}

.faq-answer {
    margin-top: 8px;
    line-height: 1.6;
}

/* ========================================
   Related Tools Section
   ======================================== */
.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.related-tool h3 {
    font-size: 1em;
    margin-bottom: 4px;
}

.related-tool a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-tool a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.related-tool p {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

/* ========================================
   How-to Steps
   ======================================== */
.howto-steps {
    margin-left: 20px;
    margin-top: 16px;
}

.howto-steps li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.howto-steps strong {
    color: var(--primary-color);
}

/* ========================================
   Form Actions
   ======================================== */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

/* ========================================
   Result Input with Copy Button
   ======================================== */
.result-with-copy {
    display: flex;
    gap: 8px;
}

.result-with-copy input {
    flex: 1;
}

@media (max-width: 480px) {
    .result-with-copy {
        flex-direction: column;
    }

    .result-with-copy button {
        width: 100%;
    }
}
