/* PRwithClaus Popup – Front-end Popup Styles */

/* ------------------------------------------------------------------ */
/* Overlay                                                              */
/* ------------------------------------------------------------------ */
.prwc-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prwc-overlay.prwc-active {
    opacity: 1;
    visibility: visible;
}

/* ------------------------------------------------------------------ */
/* Popup Box                                                            */
/* ------------------------------------------------------------------ */
.prwc-popup {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
}

.prwc-overlay.prwc-active .prwc-popup {
    transform: translateY(0) scale(1);
}

/* Inner overlay for when background image is set */
.prwc-popup-overlay-inner {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 16px;
    pointer-events: none;
    z-index: 0;
}

/* ------------------------------------------------------------------ */
/* Content                                                              */
/* ------------------------------------------------------------------ */
.prwc-popup-content {
    position: relative;
    z-index: 1;
    padding: 40px 40px 44px;
}

.prwc-popup-title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.2;
}

.prwc-popup-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* When background image is active, make text white */
.prwc-popup[style*="background-image"] .prwc-popup-title,
.prwc-popup[style*="background-image"] .prwc-popup-subtitle,
.prwc-popup[style*="background-image"] .prwc-label {
    color: #fff;
}

/* ------------------------------------------------------------------ */
/* Close Button                                                         */
/* ------------------------------------------------------------------ */
.prwc-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    padding: 0;
    line-height: 1;
}

.prwc-close-btn:hover {
    background: rgba(107, 114, 128, 0.25);
    color: #111827;
}

.prwc-popup[style*="background-image"] .prwc-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.prwc-popup[style*="background-image"] .prwc-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ------------------------------------------------------------------ */
/* Form                                                                 */
/* ------------------------------------------------------------------ */
.prwc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prwc-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prwc-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.02em;
}

.prwc-required {
    color: #ef4444;
    margin-left: 3px;
}

.prwc-input,
.prwc-textarea,
.prwc-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.prwc-input:focus,
.prwc-textarea:focus,
.prwc-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.prwc-textarea {
    resize: vertical;
    min-height: 90px;
}

.prwc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
}

/* ------------------------------------------------------------------ */
/* Submit Button                                                        */
/* ------------------------------------------------------------------ */
.prwc-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    background: #4f46e5;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    text-align: center;
    box-sizing: border-box;
}

.prwc-submit-btn:hover {
    background: #4338ca;
}

.prwc-submit-btn:active {
    transform: scale(0.98);
}

.prwc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer text below submit button */
.prwc-btn-footer {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.75);
}

/* Fallback for non-image backgrounds */
.prwc-popup:not([style*="background-image"]) .prwc-btn-footer {
    color: #6b7280;
}

.prwc-footer-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prwc-footer-link:hover {
    opacity: 0.85;
}

/* ------------------------------------------------------------------ */
/* Spinner animation                                                    */
/* ------------------------------------------------------------------ */
@keyframes prwc-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.prwc-spin {
    animation: prwc-rotate 0.8s linear infinite;
}

/* ------------------------------------------------------------------ */
/* Messages                                                             */
/* ------------------------------------------------------------------ */
.prwc-success,
.prwc-error {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 16px;
}

.prwc-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.prwc-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */
@media (max-width: 560px) {
    .prwc-popup-content {
        padding: 32px 24px 28px;
    }

    .prwc-popup-title {
        font-size: 22px;
    }
}

/* ------------------------------------------------------------------ */
/* Honeypot – visually hidden, not accessible to real users            */
/* ------------------------------------------------------------------ */
.prwc-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    tab-size: 0;
}
