/* =====================================================================
   WooTools – Request More Info  |  Frontend Styles
   ===================================================================== */

/* ── Trigger Button ─────────────────────────────────────────────────── */
.wt-ri-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.wt-ri-btn-single {
    width: 100%;
    margin-top: 4px;
}

.wt-ri-btn-loop {
    display: block;
    width: 100%;
    text-align: center;
}

/* ── Overlay ──────────────────────────────────────────────────────────  */
.wt-ri-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: wtRIFadeIn .18s ease;
    backdrop-filter: blur(2px);
}

@keyframes wtRIFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Dialog box ──────────────────────────────────────────────────────── */
.wt-ri-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 36px 40px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: wtRISlideUp .22s ease;
}

@keyframes wtRISlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Close button ──────────────────────────────────────────────────── */
.wt-ri-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    transition: color .15s;
}

.wt-ri-close:hover {
    color: #333;
}

/* ── Title / subtitle ──────────────────────────────────────────────── */
.wt-ri-title {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    padding-right: 28px;
}

.wt-ri-subtitle {
    margin: 0 0 20px;
    color: #6b7280;
    font-size: .9rem;
}

.wt-ri-file-note {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: .85rem;
    color: #166534;
    margin-bottom: 18px;
}

/* ── Form fields ───────────────────────────────────────────────────── */
.wt-ri-field-wrap {
    margin-bottom: 16px;
}

.wt-ri-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: .875rem;
    color: #374151;
}

.wt-ri-req {
    color: #ef4444;
    margin-left: 2px;
}

.wt-ri-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 9px 13px;
    font-size: .9rem;
    color: #1a1a1a;
    background: #fafafa;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.wt-ri-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
    background: #fff;
}

textarea.wt-ri-input {
    resize: vertical;
    min-height: 90px;
}

select.wt-ri-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M7%2010l5%205%205-5z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* ── Actions / Submit ──────────────────────────────────────────────── */
.wt-ri-actions {
    margin-top: 22px;
}

.wt-ri-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background: #6366f1;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, transform .1s;
    text-align: center;
}

.wt-ri-submit:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.wt-ri-submit:active {
    transform: translateY(0);
}

.wt-ri-submit:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
    transform: none;
}

/* ── Result message ────────────────────────────────────────────────── */
.wt-ri-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 7px;
    font-size: .875rem;
    display: none;
}

.wt-ri-message.wt-ri-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.wt-ri-message.wt-ri-msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

/* ── Spinner inside submit button ──────────────────────────────────── */
.wt-ri-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wtRISpin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes wtRISpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .wt-ri-dialog {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .wt-ri-title {
        font-size: 1.1rem;
    }
}