/**
 * DQA Components
 * Formularios, notificaciones y componentes reutilizables
 */

/* ========================================= */
/* Formularios Base */
/* ========================================= */
.dqa-base-form-style {
    background-color: var(--colorLavandaClaro2);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.dqa-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dqa-form-group {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
}

.dqa-form-group label {
    font-family: var(--fuentePrincipalDash);
    font-size: 1.6rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 1rem;
}

/* Inputs y textareas */
.dqa-base-form input[type="text"],
.dqa-base-form input[type="date"],
.dqa-base-form textarea {
    font-family: var(--fuentePrincipalDash);
    width: 100%;
    padding: 1.2rem 1.5rem;
    border-radius: 1rem;
    border: none;
    font-size: 1.6rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dqa-base-form input:focus,
.dqa-base-form textarea:focus {
    border-color: var(--colorLavandaClaro2);
    box-shadow: 0 0 0 3px var(--colorLavandaClaro2);
    outline: none;
}

.dqa-base-form textarea {
    min-height: 15rem;
    resize: vertical;
}

/* Contenedor de acciones (botones) */
.dqa-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 30px;
}

/* ========================================= */
/* Botones */
/* ========================================= */
.dqa-btn {
    font-family: var(--fuentePrincipalDash);
    font-size: 1.6rem !important;
    padding: 1rem 3rem !important;
    border-radius: 1rem;
    cursor: pointer;
    font-weight: 500;
    border: none !important;
    transition: background-color 0.2s;
}

.dqa-btn-primary {
    background-color: var(--colorMoradoOscuro);
    color: #fff;
}

.dqa-btn-primary:hover {
    background-color: var(--colorMoradoOscuro);
}

.dqa-btn-secondary {
    background-color: var(--btnSecondaryBg, #e5e7eb);
    color: var(--btnSecondaryText, #374151);
    border: 1px solid var(--btnSecondaryBorder, #d1d5db);
}

.dqa-btn-secondary:hover {
    background-color: var(--btnSecondaryBgHover, #d1d5db);
    border-color: var(--btnSecondaryBorderHover, #9ca3af);
}

/* ========================================= */
/* Notificaciones (Header) */
/* ========================================= */
.dqa-notifications-container {
    position: relative;
    z-index: 1000;
}

.dqa-notification-bell {
    cursor: pointer;
    font-size: 1.5em;
    padding: 5px;
    position: relative;
    display: inline-block;
}

/* Badge (Globo Rojo de Conteo) */
.dqa-notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #f00;
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    line-height: 1;
    min-width: 15px;
    text-align: center;
}

.dqa-hidden {
    display: none !important;
}

/* Panel Desplegable */
.dqa-notification-panel {
    position: absolute;
    right: 0;
    top: 100%;
    width: 380px;
    max-width: 95vw;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-top: 10px;
    overflow: hidden;
    z-index: 9999;
}

.dqa-panel-header {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 1em;
    border-bottom: 1px solid #e5e5e5;
    background-color: #fafafa;
    color: #333;
}

.dqa-panel-footer {
    padding: 12px 16px;
    border-bottom: none;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    color: #0073aa;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9em;
    background-color: #fafafa;
    transition: background-color 0.2s ease;
}

.dqa-panel-footer:hover {
    background-color: #f0f0f0;
    color: #005a87;
}

/* Items individuales de Notificación */
.dqa-notification-list {
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

/* Scrollbar personalizada para Webkit (Chrome, Safari) */
.dqa-notification-list::-webkit-scrollbar {
    width: 6px;
}

.dqa-notification-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.dqa-notification-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.dqa-notification-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.dqa-notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.2s ease;
}

.dqa-notification-item.dqa-unread {
    background-color: #f0f7ff;
}

.dqa-notification-item:hover {
    background-color: var(--colorLavandaClaro2);
}

.dqa-notification-item:last-child {
    border-bottom: none;
}

/* Avatar container */
.dqa-notification-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e3e3e3;
}

.dqa-notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Icono fallback cuando no hay avatar */
.dqa-notification-avatar i {
    font-size: 18px;
    color: #666;
}

.dqa-notification-content {
    flex-grow: 1;
    position: relative;
    min-width: 0;
}

.dqa-notification-text {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
    color: #333;
    word-wrap: break-word;
}

.dqa-notification-text strong {
    color: #000;
    font-weight: 600;
}

.dqa-notification-text span {
    color: #555;
}

.dqa-notification-time {
    display: block;
    font-size: 0.75em;
    color: #888;
    margin-top: 4px;
}

.dqa-notification-dot {
    position: absolute;
    top: 2px;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #0073aa;
    border-radius: 50%;
    border: 2px solid #fff;
}

.dqa-notification-empty {
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
    color: #aaa;
    font-size: 0.95em;
}
