/* ============================================
   ESTILOS DEL BOTÓN
   ============================================ */
.wpforo-open-popup-btn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.wpforo-btn-default {
    background: #0073aa;
    color: white;
}

.wpforo-btn-default:hover {
    background: #005a87;
}

.wpforo-btn-primary {
    background: #4CAF50;
    color: white;
}

.wpforo-btn-primary:hover {
    background: #45a049;
}

.wpforo-btn-success {
    background: #28a745;
    color: white;
}

.wpforo-btn-success:hover {
    background: #218838;
}

.wpforo-btn-info {
    background: #17a2b8;
    color: white;
}

.wpforo-btn-info:hover {
    background: #138496;
}
button.wpforo-cancel-button {
    border-radius: 10px;
    padding: 10px 20px;   
}
button.wpforo-submit-button,
button.wpforo-open-popup-btn {
    background: #76B82A;
    border: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    border-radius: 10px;
    padding: 10px 20px;
}
button.wpforo-submit-button:hover,
button.wpforo-open-popup-btn:hover,
button.wpforo-submit-button:focus,
button.wpforo-open-popup-btn:focus {
    background: #76B82A !important;
    opacity: 0.9;
}

/* ============================================
   ESTILOS DEL MODAL
   ============================================ */
.wpforo-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wpforo-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wpforo-modal-close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
}

.wpforo-modal-close:hover,
.wpforo-modal-close:focus {
    color: #000;
}

.wpforo-modal-body {
    padding: 30px;
}

.wpforo-modal-body h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

/* ============================================
   ESTILOS DEL FORMULARIO
   ============================================ */
.wpforo-add-topic-form .form-group {
    margin-bottom: 20px;
}

.wpforo-add-topic-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.wpforo-add-topic-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-family: inherit;
}

.wpforo-add-topic-form .form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.wpforo-add-topic-form textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* ============================================
   ACCIONES DEL FORMULARIO
   ============================================ */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.wpforo-submit-button {
    background: #4CAF50;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.wpforo-submit-button:hover {
    background: #45a049;
}

.wpforo-submit-button:active {
    transform: scale(0.98);
}

.wpforo-cancel-button {
    background: #f1f1f1;
    color: #333;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.wpforo-cancel-button:hover {
    background: #e0e0e0;
}

.wpforo-cancel-button:active {
    transform: scale(0.98);
}

/* ============================================
   MENSAJES
   ============================================ */
#wpforo-modal-messages {
    margin-bottom: 20px;
}

.wpforo-message {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.wpforo-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wpforo-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .wpforo-modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .wpforo-modal-body {
        padding: 20px;
    }

    .wpforo-modal-body h2 {
        font-size: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .wpforo-submit-button,
    .wpforo-cancel-button {
        width: 100%;
    }

    .wpforo-modal-close {
        right: 15px;
        top: 10px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .wpforo-open-popup-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .wpforo-modal-content {
        margin: 5% auto;
    }

    .wpforo-modal-body {
        padding: 15px;
    }

    .wpforo-add-topic-form .form-control {
        padding: 10px;
        font-size: 13px;
    }
}

/* ============================================
   ESTILOS DE TESAURO API
   ============================================ */
.tesauro-loading {
    padding: 20px;
    text-align: center;
    color: #667eea;
    font-size: 14px;
}

.tesauro-result-item.selected {
    background: #667eea !important;
    color: #fff;
}

.tesauro-result-item.selected .tesauro-result-hierarchy {
    color: #fff;
}

.tesauro-result-hierarchy {
    display: block;
    font-size: 13px;
    line-height: 1.4;
}

.tesauro-result-hierarchy b {
    color: #667eea;
    font-weight: normal;
    margin: 0 3px;
}

.tesauro-result-item.selected .tesauro-result-hierarchy b {
    color: rgba(255, 255, 255, 0.8);
}

/* Wrapper de búsqueda */
.wpforo-tesauro-search-wrapper {
    position: relative;
}

.wpforo-tesauro-search-input {
    padding-right: 40px !important;
}

/* Responsive para tesauro */
@media (max-width: 480px) {
    .tesauro-result-hierarchy {
        font-size: 12px;
    }

    .tesauro-selected-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .tesauro-clear-btn {
        width: 100%;
    }
}