/**
 * Word Counter Tool – Dr Tool Brand (Final)
 * Outer background transparent, container white inside border
 */

.word-counter-wrapper {
    font-family: 'Manrope', sans-serif;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    background: transparent;
    box-sizing: border-box;
}

.word-counter-container {
    background: #ffffff;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
}

.word-counter-header {
    text-align: center;
    margin-bottom: 20px;
}

.word-counter-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0b1120;
    margin: 0 0 8px 0;
    letter-spacing: -0.2px;
}

.live-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    padding: 8px 20px;
    background: #f8fafc;
    border-radius: 40px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e8f2f4;
}

.live-stat-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.live-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
}

.live-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0e7e94;
    background: white;
    padding: 2px 10px;
    border-radius: 30px;
    min-width: 40px;
    text-align: center;
}

.live-stat-divider {
    width: 1px;
    height: 20px;
    background: #dbe4ea;
}

.input-full-width {
    background: #ffffff;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    padding: 0;
    margin-top: 8px;
    margin-bottom: 28px;
    overflow: hidden;
}

.textarea-wrapper {
    padding: 20px 20px 0 20px;
}

.word-counter-textarea {
    width: 100%;
    min-height: 320px;
    padding: 16px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    font-family: 'Manrope', monospace;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    background: #ffffff;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #1f2937;
}

.word-counter-textarea:focus {
    outline: none;
    border-color: #0a6475;
    box-shadow: 0 0 0 3px rgba(14, 126, 148, 0.1);
}

.action-buttons-group {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.action-btn {
    flex: 1;
    padding: 12px 8px;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.action-btn.primary {
    background: #0e7e94;
    color: #ffffff;
}

.action-btn.primary:hover {
    background: #0a6475;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: #e8f2f4;
    color: #0e7e94;
    border: 1px solid #dbe4ea;
}

.action-btn.secondary:hover {
    background: #0e7e94;
    color: #ffffff;
    border-color: #0e7e94;
}

.tools-section {
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 20px;
}

.tools-header {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1f2937;
    margin-bottom: 12px;
}

.tools-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tool-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.tool-label {
    font-size: 0.75rem;
    font-weight: 600;
    background: #f8fafc;
    padding: 4px 12px;
    border-radius: 10px;
    color: #374151;
    min-width: 65px;
}

.tool-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-btn {
    background: #ffffff;
    border: 1px solid #dbe4ea;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    color: #1f2937;
}

.tool-btn:hover {
    background: #e8f2f4;
    border-color: #0e7e94;
    color: #0e7e94;
}

.target-panel {
    padding: 16px 20px;
}

.target-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    gap: 10px;
}

.target-header label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #111827;
}

.target-input {
    width: 110px;
    padding: 8px 12px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    font-family: 'Manrope', monospace;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1f2937;
}

.target-input:focus {
    outline: none;
    border-color: #0a6475;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar-container {
    flex: 1;
    background: #e8f2f4;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    background: #0e7e94;
    width: 0%;
    height: 100%;
    border-radius: 10px;
    transition: width 0.25s ease;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0e7e94;
    min-width: 70px;
    text-align: right;
}

.stats-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    padding: 20px;
}

.stat-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 18px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    display: inline-block;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed #e8f2f4;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-number {
    font-weight: 800;
    font-size: 1rem;
    color: #0e7e94;
    background: #f8fafc;
    padding: 2px 10px;
    border-radius: 10px;
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.adv-item {
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.adv-item.full-width {
    grid-column: 1 / -1;
}

.adv-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
}

.adv-value {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1f2937;
}

.adv-value.warning {
    color: #14b8c4;
    background: #e8f2f4;
    padding: 2px 8px;
    border-radius: 10px;
}

.keyword-container {
    margin-top: 12px;
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.keyword-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-badge {
    background: #e8f2f4;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #0e7e94;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.keyword-percent {
    background: #0e7e94;
    color: #ffffff;
    border-radius: 10px;
    padding: 0px 5px;
    font-size: 0.65rem;
    font-weight: 700;
}

.seo-field {
    margin-bottom: 18px;
}

.seo-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
    display: block;
    margin-bottom: 6px;
}

.seo-input, .seo-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    background: #ffffff;
    transition: 0.15s;
    color: #111827;
}

.seo-input:focus, .seo-textarea:focus {
    outline: none;
    border-color: #0a6475;
    box-shadow: 0 0 0 2px rgba(14, 126, 148, 0.1);
}

.seo-feedback {
    font-size: 0.7rem;
    margin-top: 5px;
    font-weight: 500;
}

.seo-feedback.valid {
    color: #0e7e94;
}

.seo-feedback.error {
    color: #14b8c4;
}

.seo-note {
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    color: #374151;
    margin-top: 10px;
}

.info-footer {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e8f2f4;
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
}

.info-footer p {
    margin: 0 0 8px 0;
}

.info-footer p:last-child {
    margin-bottom: 0;
}

.word-counter-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: #0e7e94;
    color: #ffffff;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(450px);
    transition: transform 0.3s ease;
}

.word-counter-notification.show {
    transform: translateX(0);
}

.word-counter-notification.error {
    background: #14b8c4;
}

.word-counter-notification.warning {
    background: #0a6475;
}

@media (max-width: 768px) {
    .word-counter-wrapper {
        padding: 16px;
    }
    .word-counter-container {
        padding: 18px;
    }
    .word-counter-title {
        font-size: 1.75rem;
    }
    .action-buttons-group {
        flex-direction: column;
        gap: 10px;
    }
    .tool-group {
        flex-direction: column;
        align-items: stretch;
    }
    .tool-buttons {
        justify-content: flex-start;
    }
    .stat-grid {
        grid-template-columns: 1fr;
    }
    .advanced-grid {
        grid-template-columns: 1fr;
    }
    .word-counter-textarea {
        min-height: 240px;
    }
    .live-stats-bar {
        gap: 12px;
        padding: 6px 16px;
    }
}

@media (max-width: 480px) {
    .word-counter-wrapper {
        padding: 12px;
    }
    .word-counter-container {
        padding: 14px;
    }
    .word-counter-title {
        font-size: 1.5rem;
    }
    .word-counter-textarea {
        min-height: 200px;
        font-size: 16px;
    }
    .action-btn {
        padding: 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .adv-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .live-stats-bar {
        gap: 10px;
        padding: 6px 12px;
    }
    .live-stat-value {
        font-size: 0.9rem;
        padding: 1px 6px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .action-btn, .tool-btn {
        min-height: 44px;
    }
}

@media print {
    .word-counter-wrapper {
        padding: 0;
    }
    .action-btn, .tools-section, .target-panel, .seo-note {
        display: none;
    }
}