/* ========================================
   Online Text Tool — Tool Component Styles
   Use these classes in $toolHTML for a
   clean, consistent tool layout.
   ======================================== */

/* ----- Layout: Two-column grid (input | output) ----- */
.ott-tool-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.ott-tool-layout-full {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (max-width: 768px) {
    .ott-tool-layout {
        grid-template-columns: 1fr;
    }
}

/* ----- Section (groups related content) ----- */
.ott-tool-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ----- Label ----- */
.ott-tool-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

/* ----- Text Input / Textarea ----- */
.ott-tool-input,
.ott-tool-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ott-tool-input:focus,
.ott-tool-textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.ott-tool-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

/* ----- Select dropdown ----- */
.ott-tool-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.ott-tool-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* ----- Buttons ----- */
.ott-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.4;
    min-height: 42px;
}
.ott-tool-btn:hover {
    background: #4338ca;
}
.ott-tool-btn:active {
    transform: scale(0.98);
}

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

.ott-tool-btn-success {
    background: #059669;
}
.ott-tool-btn-success:hover {
    background: #047857;
}

.ott-tool-btn-danger {
    background: #ef4444;
}
.ott-tool-btn-danger:hover {
    background: #dc2626;
}

.ott-tool-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    min-height: 34px;
}

/* Button row */
.ott-tool-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ----- Output area ----- */
.ott-tool-output {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    min-height: 60px;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* ----- Stat cards (for metrics display) ----- */
.ott-tool-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}
.ott-tool-stat {
    background: #f9fafb;
    padding: 20px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
}
.ott-tool-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #4f46e5;
    line-height: 1.2;
}
.ott-tool-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ----- Generated result display (large text) ----- */
.ott-tool-result {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    color: #4f46e5;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ----- Checkbox / Radio row ----- */
.ott-tool-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.ott-tool-check-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

/* ----- Range slider ----- */
.ott-tool-range {
    width: 100%;
}

/* ----- Copy feedback ----- */
.ott-tool-copied {
    background: #059669 !important;
    color: #fff !important;
    border-color: #059669 !important;
}
