/* ─── AGCP Popup Overlay ─── */
.agcp-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: agcpFadeIn .3s ease;
}

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

@keyframes agcpSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ─── Popup Box ─── */
.agcp-popup {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 32px;
    box-shadow: 0 25px 60px rgba(0,0,0,.2);
    animation: agcpSlideUp .4s ease;
}

.agcp-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all .2s;
}
.agcp-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* ─── Popup Header ─── */
.agcp-popup-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.agcp-popup-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
}

.agcp-selected-service {
    font-size: 16px;
    color: #EF7F1A;
    font-weight: 600;
    margin: 0 0 4px;
}

.agcp-selected-price {
    font-size: 28px;
    font-weight: 700;
    color: #170F49;
    margin: 0;
}

/* ─── Form Fields ─── */
.agcp-field {
    margin-bottom: 18px;
}

.agcp-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.agcp-field label span {
    color: #ef4444;
}

.agcp-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    box-sizing: border-box;
}

.agcp-field input:focus {
    border-color: #EF7F1A;
    box-shadow: 0 0 0 3px rgba(239,127,26,.12);
    background: #fff;
}

.agcp-field input.agcp-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

/* ─── Error Message ─── */
.agcp-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
}

/* ─── Submit Button ─── */
.agcp-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #EF7F1A, #ff9a3c);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.agcp-submit-btn:hover {
    background: linear-gradient(135deg, #d96a0e, #EF7F1A);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239,127,26,.3);
}

.agcp-submit-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

.agcp-btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Processing State ─── */
.agcp-processing {
    text-align: center;
    padding: 40px 20px;
}

.agcp-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #EF7F1A;
    border-radius: 50%;
    animation: agcpSpin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.agcp-processing h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 8px;
}

.agcp-processing p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* ─── Result States ─── */
.agcp-result {
    text-align: center;
    padding: 30px 20px;
}

.agcp-result-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    font-weight: 700;
}

.agcp-success .agcp-result-icon {
    background: #dcfce7;
    color: #16a34a;
}

.agcp-failed .agcp-result-icon {
    background: #fee2e2;
    color: #dc2626;
}

.agcp-result h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 10px;
}

.agcp-result p {
    color: #666;
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* ─── Mobile ─── */
@media (max-width: 600px) {
    .agcp-popup {
        padding: 28px 20px;
        border-radius: 12px;
        max-height: 95vh;
    }

    .agcp-popup-header h3 {
        font-size: 18px;
    }

    .agcp-selected-price {
        font-size: 24px;
    }

    .agcp-field input {
        padding: 10px 14px;
        font-size: 14px;
    }
}
