/* ===========================
   CF7 Modal CTA — styles
   =========================== */

:root {
    --cf7mc-accent: #2563eb;
    --cf7mc-radius: 8px;
    --cf7mc-transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ---- CTA Button ---- */
.cf7mc-wrap {
    display: inline-block;
}

.cf7mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--cf7mc-radius);
    transition: background var(--cf7mc-transition),
                color var(--cf7mc-transition),
                border-color var(--cf7mc-transition),
                transform var(--cf7mc-transition),
                box-shadow var(--cf7mc-transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}
.cf7mc-btn:focus-visible {
    outline: 3px solid var(--cf7mc-accent);
    outline-offset: 3px;
}
.cf7mc-btn:active { transform: scale(.97); }

/* Sizes */
.cf7mc-btn--sm { padding: 8px 18px;  font-size: 13px; }
.cf7mc-btn--md { padding: 12px 26px; font-size: 15px; }
.cf7mc-btn--lg { padding: 16px 36px; font-size: 17px; }

/* Styles */
.cf7mc-btn--primary {
    background: var(--cf7mc-accent);
    color: #fff;
    border-color: var(--cf7mc-accent);
    box-shadow: 0 4px 14px rgba(37,99,235,.25);
}
.cf7mc-btn--primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(37,99,235,.35);
    transform: translateY(-1px);
}

.cf7mc-btn--secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #f1f5f9;
}
.cf7mc-btn--secondary:hover {
    background: #e2e8f0;
    border-color: #e2e8f0;
    transform: translateY(-1px);
}

.cf7mc-btn--outline {
    background: transparent;
    color: var(--cf7mc-accent);
    border-color: var(--cf7mc-accent);
}
.cf7mc-btn--outline:hover {
    background: var(--cf7mc-accent);
    color: #fff;
    transform: translateY(-1px);
}

.cf7mc-btn--ghost {
    background: transparent;
    color: var(--cf7mc-accent);
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cf7mc-btn--ghost:hover {
    text-decoration-thickness: 2px;
    transform: none;
}

.cf7mc-btn-icon {
    font-style: normal;
    font-size: 1.1em;
    line-height: 1;
}

/* ---- Overlay ---- */
.cf7mc-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(15, 20, 35, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    /* Animation */
    opacity: 0;
    transition: opacity .25s ease;
}
.cf7mc-overlay[hidden] {
    display: none !important;
}
.cf7mc-overlay.cf7mc-visible {
    opacity: 1;
}
.cf7mc-overlay.cf7mc-blur-bg {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ---- Modal ---- */
.cf7mc-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: var(--cf7mc-modal-width, 560px);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
    transform: translateY(28px) scale(.97);
    transition: transform .28s cubic-bezier(.22,.68,0,1.2), opacity .25s ease;
    opacity: 0;
    position: relative;
}
.cf7mc-overlay.cf7mc-visible .cf7mc-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ---- Modal Header ---- */
.cf7mc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 28px 28px 0;
}

.cf7mc-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.25;
}

.cf7mc-modal-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}
.cf7mc-modal-subtitle:empty {
    display: none;
}

.cf7mc-close {
    flex-shrink: 0;
    margin-top: 2px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--cf7mc-transition), color var(--cf7mc-transition);
}
.cf7mc-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ---- Modal Body ---- */
.cf7mc-modal-body {
    padding: 24px 28px 32px;
}

/* ---- Loading ---- */
.cf7mc-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
    padding: 16px 0;
}

.cf7mc-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: var(--cf7mc-accent);
    border-radius: 50%;
    animation: cf7mc-spin .65s linear infinite;
    flex-shrink: 0;
}
@keyframes cf7mc-spin {
    to { transform: rotate(360deg); }
}

/* ---- CF7 form overrides inside modal ---- */
.cf7mc-modal-body .wpcf7-form {
    margin: 0;
}
.cf7mc-modal-body .wpcf7-form p {
    margin-bottom: 16px;
}
.cf7mc-modal-body .wpcf7-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.cf7mc-modal-body .wpcf7-form input[type="text"],
.cf7mc-modal-body .wpcf7-form input[type="email"],
.cf7mc-modal-body .wpcf7-form input[type="tel"],
.cf7mc-modal-body .wpcf7-form input[type="url"],
.cf7mc-modal-body .wpcf7-form input[type="number"],
.cf7mc-modal-body .wpcf7-form select,
.cf7mc-modal-body .wpcf7-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    transition: border-color .2s;
}
.cf7mc-modal-body .wpcf7-form input:focus,
.cf7mc-modal-body .wpcf7-form select:focus,
.cf7mc-modal-body .wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--cf7mc-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.cf7mc-modal-body .wpcf7-form textarea {
    min-height: 100px;
    resize: vertical;
}
.cf7mc-modal-body .wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 13px 24px;
    background: var(--cf7mc-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter .2s, transform .15s;
    box-shadow: 0 4px 14px rgba(37,99,235,.2);
}
.cf7mc-modal-body .wpcf7-form input[type="submit"]:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* CF7 validation messages */
.cf7mc-modal-body .wpcf7-not-valid-tip {
    color: #dc2626;
    font-size: 12px;
    margin-top: 3px;
}
.cf7mc-modal-body .wpcf7-response-output {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-top: 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.cf7mc-modal-body .wpcf7-mail-sent-ok {
    background: #f0fdf4;
    border-color: #86efac !important;
    color: #15803d;
}
.cf7mc-modal-body .wpcf7-validation-errors {
    background: #fef2f2;
    border-color: #fca5a5 !important;
    color: #b91c1c;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .cf7mc-modal-header { padding: 20px 20px 0; }
    .cf7mc-modal-body   { padding: 20px 20px 28px; }
    .cf7mc-modal-title  { font-size: 18px; }
    .cf7mc-btn--lg { padding: 13px 26px; font-size: 16px; }
}
