/* Texco - popup-uri generale cu formulare Contact Form 7.
   Structura vizuala urmeaza popup-ul din pluginul texco-documente-resurse (.tdr-modal). */
.txp-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    max-width: 100%;
    --txp-accent: #14253F;
}
.txp-modal.is-open { display: block; }
body.txp-modal-open { overflow: hidden; }
.txp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 54, .55);
    backdrop-filter: blur(2px);
}
.txp-modal-content {
    position: relative;
    max-width: 600px;
    width: calc(100% - 32px);
    margin: 10vh auto;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 0;
    padding: 40px 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.txp-modal .txp-modal-close {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 45px;
    height: 45px;
    border: 0;
    background: transparent;
    font-size: 45px;
    line-height: 1;
    padding: 0;
    color: red;
    cursor: pointer;
}
.txp-modal .txp-modal-close:hover { background: #1A52A0; }
.txp-modal h2.txp-modal-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #1a2d4d;
}
.txp-modal-subtitle {
    margin: 0 0 18px;
    font-size: 16px;
    color: #6b7a90;
}

/* Contact Form 7 */
.txp-modal-form .wpcf7 { margin: 0; padding: 0; }
.txp-modal-form .wpcf7-form p { margin: 0 0 14px; }
.txp-modal-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 6px;
}
.txp-modal-form input[type="text"],
.txp-modal-form input[type="email"],
.txp-modal-form input[type="tel"],
.txp-modal-form input[type="url"],
.txp-modal-form input[type="number"],
.txp-modal-form input[type="date"],
.txp-modal-form textarea,
.txp-modal-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d6dde6;
    border-radius: 0;
    font-size: 16px; /* min 16px: previne auto-zoom-ul iOS/Android la focus pe input */
    font-family: inherit;
    box-sizing: border-box;
}
.txp-modal-form textarea { min-height: 120px; resize: vertical; }
.txp-modal-form input:focus,
.txp-modal-form textarea:focus,
.txp-modal-form select:focus {
    outline: 2px solid #1a73e8;
    outline-offset: -1px;
}

/* Checkbox / radio (ex. acordul GDPR) */
.txp-modal-form .wpcf7-list-item { margin: 0 0 6px; display: block; }
.txp-modal-form .wpcf7-list-item label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 0;
    font-weight: 400;
}
.txp-modal-form .wpcf7-list-item input { margin-top: 3px; }
.txp-modal-form .wpcf7-list-item-label { font-size: 13px; color: #6b7a90; }
.txp-modal-form .wpcf7-list-item-label a { text-decoration: underline; }
.txp-modal-form .wpcf7-submit {
    width: 100%;
    background: var(--e-global-color-primary);
    color: #fff;
    padding: 12px;
    border: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.txp-modal-form .wpcf7-submit:hover { background: var(--e-global-color-secondary); }
.txp-modal-form .wpcf7-submit:disabled { opacity: .6; cursor: wait; }
.txp-modal-form .wpcf7-not-valid-tip {
    color: #c0392b;
    font-size: 12px;
    margin-top: 4px;
}
.txp-modal-form .wpcf7-response-output {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-width: 1px;
    font-size: 13px;
}
.txp-modal-form .wpcf7-spinner { display: block; margin: 8px auto 0; }

/* ---------- Stare de succes dupa trimiterea formularului ---------- */

/* Ascundem formularul si antetul; ramane doar confirmarea. */
.txp-modal.txp-is-success .txp-modal-form,
.txp-modal.txp-is-success .txp-modal-title,
.txp-modal.txp-is-success .txp-modal-subtitle {
    display: none;
}
.txp-modal.txp-is-success .txp-modal-content {
    padding-bottom: 32px;
}

.txp-success {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 8px 12px;
    outline: none;
    animation: txp-success-in .45s cubic-bezier(.16, 1, .3, 1) both;
}

.txp-success-icon {
    width: 88px;
    height: 88px;
    display: block;
    overflow: visible;
}
.txp-success-glow {
    fill: var(--txp-accent);
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: txp-success-glow .6s ease-out .45s both;
}
.txp-success-circle {
    fill: none;
    stroke: var(--txp-accent);
    stroke-width: 2;
    stroke-dasharray: 151;   /* circumferinta pentru r=24 */
    stroke-dashoffset: 151;
    transform: rotate(-90deg);
    transform-box: fill-box;
    transform-origin: center;
    animation: txp-success-draw .6s cubic-bezier(.65, 0, .45, 1) forwards;
}
.txp-success-check {
    fill: none;
    stroke: var(--txp-accent);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 34;    /* lungimea traseului bifei */
    stroke-dashoffset: 34;
    animation: txp-success-draw .35s cubic-bezier(.65, 0, .45, 1) .45s forwards;
}

.txp-success-text {
    margin: 20px 0 0;
    max-width: 32ch;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--txp-accent);
    animation: txp-success-in .4s ease-out .55s both;
}

/* Bara care arata cat mai sta popup-ul deschis (doar daca CLOSE_AFTER_SUCCESS > 0). */
.txp-success-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--txp-accent);
    opacity: .2;
    transform-origin: left center;
    animation: txp-success-progress var(--txp-success-delay, 3000ms) linear both;
}

@keyframes txp-success-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
@keyframes txp-success-draw {
    to { stroke-dashoffset: 0; }
}
@keyframes txp-success-glow {
    0%   { opacity: 0;   transform: scale(.4); }
    60%  { opacity: .12; transform: scale(1); }
    100% { opacity: .08; transform: scale(1); }
}
@keyframes txp-success-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .txp-success,
    .txp-success-text,
    .txp-success-glow,
    .txp-success-circle,
    .txp-success-check,
    .txp-success-progress {
        animation: none;
    }
    .txp-success-circle,
    .txp-success-check { stroke-dashoffset: 0; }
    .txp-success-glow  { opacity: .08; }
}

@media (max-width: 640px) {
    .txp-modal-content {
        margin: 5vh auto;
        padding: 20px;
        max-width: calc(100% - 32px);
        max-height: 90vh;
    }
    .txp-modal h2.txp-modal-title { font-size: 20px; }
    .txp-success-icon { width: 72px; height: 72px; }
    .txp-success-text { font-size: 16px; }
}