/* =========================================================
   FF Customer Popup — My Account: "New client" link
   ========================================================= */
.ffcp-new-client-wrap {
    margin-top: 14px;
    font-size: 14px;
    color: #555;
}
.ffcp-new-client-wrap a.ffcp-open-popup {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}
.ffcp-new-client-wrap a.ffcp-open-popup:hover {
    color: #005f8e;
}

/* =========================================================
   FF Customer Popup — Frontend Styles
   Compatible with Ecomall Child theme
   ========================================================= */

/* Prevent body scroll when popup is open */
body.ffcp-no-scroll {
    overflow: hidden;
}

/* Overlay / backdrop */
.ffcp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ffcp-overlay.ffcp-active {
    display: flex;
    opacity: 1;
    animation: ffcpFadeIn 0.25s ease forwards;
}

@keyframes ffcpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Popup box */
.ffcp-popup {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    padding: 36px 40px 32px;
    width: 100%;
    max-width: 500px;
    position: relative;
    animation: ffcpSlideIn 0.25s ease forwards;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Close button */
.ffcp-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 0.15s;
}
.ffcp-close:hover { color: #333; }

/* Title & description */
.ffcp-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}
.ffcp-desc {
    margin: 0 0 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* Form rows */
.ffcp-row {
    margin-bottom: 1px;
}
.ffcp-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
.ffcp-req {
    color: #c00;
    margin-left: 2px;
}
.ffcp-row input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    color: #222;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    background: #fafafa;
}
.ffcp-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    color: #222;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.ffcp-row select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
    background-color: #fff;
}
.ffcp-row select.ffcp-field-invalid {
    border-color: #c00;
    background-color: #fff8f8;
}

.ffcp-row input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
    background: #fff;
}
.ffcp-row input.ffcp-field-invalid {
    border-color: #c00;
    background: #fff8f8;
}

/* Field-level errors */
.ffcp-field-error {
    display: block;
    color: #c00;
    font-size: 12px;
    margin-top: 3px;
}

/* General error */
.ffcp-general-error {
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

/* Privacy text */
.ffcp-privacy {
    font-size: 12px;
    color: #777;
    margin-bottom: 16px;
    line-height: 1.5;
}
.ffcp-privacy a { color: #0073aa; }

/* Submit row */
.ffcp-submit-row {
    margin-top: 4px;
}
.ffcp-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    border: none;
    background: #0073aa;
    color: #fff;
    transition: background 0.15s, opacity 0.15s;
    letter-spacing: 0.2px;
}
.ffcp-btn-submit:hover:not(:disabled) {
    background: #005f8e;
}
.ffcp-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.ffcp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ffcpSpin 0.7s linear infinite;
}
@keyframes ffcpSpin {
    to { transform: rotate(360deg); }
}

/* Success state */
.ffcp-success-wrap {
    text-align: center;
    padding: 20px 0;
}
.ffcp-success-icon {
    font-size: 52px;
    color: #28a745;
    margin-bottom: 16px;
    line-height: 1;
}
.ffcp-success-msg {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* Mobile */
@media (max-width: 560px) {
    .ffcp-popup {
        padding: 24px 20px 22px;
    }
    .ffcp-title {
        font-size: 18px;
    }
}
