/* HTML Entity Encoder Tool Specific Styles */

.entity-encoder-container {
    max-width: 520px;
    margin: 32px auto 0 auto;
    background: var(--bs-body-bg);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(var(--bs-primary-rgb), 0.125);
    padding: 32px 28px 24px 28px;
}

.entity-form-group {
    margin-bottom: 18px;
}

.entity-label {
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
    color: var(--bs-dark);
}

.entity-textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--bs-border-color);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.entity-textarea:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.entity-textarea.readonly {
    background: var(--bs-light);
    color: var(--bs-dark);
}

.entity-button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.entity-btn {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.entity-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.entity-btn:active {
    transform: translateY(0);
}

.entity-btn.encode {
    background: var(--bs-primary);
    color: white;
}

.entity-btn.encode:hover {
    background: var(--bs-primary);
    filter: brightness(1.1);
}

.entity-btn.decode {
    background: var(--bs-success);
    color: white;
}

.entity-btn.decode:hover {
    background: var(--bs-success);
    filter: brightness(1.1);
}

.entity-btn.clear {
    background: var(--bs-danger);
    color: white;
}

.entity-btn.clear:hover {
    background: var(--bs-danger);
    filter: brightness(1.1);
}

.entity-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.entity-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    filter: none;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bs-secondary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.entity-result-wrapper {
    position: relative;
}

.entity-result-wrapper:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: var(--bs-dark);
}

.entity-help-text {
    font-size: 0.9rem;
    color: var(--bs-secondary);
    margin-top: 4px;
    font-style: italic;
}

@media (max-width: 576px) {
    .entity-encoder-container {
        margin: 16px;
        padding: 24px 20px 16px 20px;
    }
    
    .entity-button-group {
        flex-direction: column;
    }
    
    .entity-btn {
        flex: none;
    }
}
