/* ============================
   MODAL (INFO)
============================ */

.modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999999;
    backdrop-filter: blur(2px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--color-bg);
    padding: 24px;
    border-radius: var(--radius-lg);
    width: min(420px, 100%);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--color-border);
    position: relative;
    animation: modalFade 0.25s ease-out;
    text-align: center; /* CENTRADO PROFESIONAL */
}

@keyframes modalFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-content h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-strong);
}

.modal-content p {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-primary);
}

/* ============================
   BOTÓN ℹ️ (INFO BUTTON)
============================ */

.info-btn {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ============================
   SHARE ACTIONS
============================ */

.share-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

/* Botón individual */
.share-btn {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.share-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* Iconos SVG */
.share-btn svg {
    width: 26px;
    height: 26px;
    display: block;
}

/* Emojis (copiar, imprimir, TXT) */
.share-btn:not(:has(svg)) {
    font-size: 24px;
    line-height: 1;
}

/* ============================
   SHARE MESSAGE BOX
============================ */

.share-message {
    margin-top: 22px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    padding: 16px;
    border-radius: 12px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}


.share-message h4 {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-strong);
}

#share-message {
    width: 100%;
    min-height: 120px;
    resize: none;
    overflow: hidden;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font-size: 14px;
    line-height: 1.45;
    color: var(--color-text);
    box-sizing: border-box;
    white-space: pre-wrap;
}

#copy-share-message {
    margin-top: 12px;
    width: 100%;
}

body.dark-mode #copy-share-message,
body.dark-mode #toggle-share {
    background: var(--color-hover);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

body.dark-mode #copy-share-message:hover,
body.dark-mode #toggle-share:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-primary);
    color: var(--color-text);
}

/* ============================
   UTILIDAD GLOBAL
============================ */

.hidden {
    display: none !important;
}
/* ============================
   TEXTAREAS SIN RESIZE
============================ */

.tool-input {
    resize: none;
}
/* ============================
   BARRA DE LÍMITE DE TEXTO
============================ */

.text-limit-bar {
    width: 100%;
    height: 6px;
    background: var(--color-bg-alt);
    border-radius: 6px;
    margin-top: 8px;
    overflow: hidden;
}

.text-limit-progress {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary);
    transition: width 0.25s ease, background-color 0.25s ease;
}

.text-limit-counter {
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: right;
}

.limit-reached {
    border-color: #d93025 !important;
    background: rgba(217, 48, 37, 0.08);
}
.paste-warning {
    margin-top: 6px;
    font-size: 13px;
    color: #d93025;
    background: rgba(217, 48, 37, 0.08);
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 3px solid #d93025;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}



/* ============================
   RESPONSIVE EXTRA
============================ */

@media (max-width: 480px) {

    .info-btn {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .share-btn {
        width: 44px;
        height: 44px;
    }

    .modal-content {
        padding: 18px;
    }
}

