/* SP Invoice — form & modal styles */

.sp-buy-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    color: #fff !important;
    border: 0;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.25);
    text-decoration: none;
    font-family: inherit;
}
.sp-buy-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(236, 72, 153, 0.35); color: #fff !important; }
.sp-buy-btn:active { transform: translateY(0); }
.sp-buy-btn:focus { outline: 2px solid #ec4899; outline-offset: 2px; }

/* Modal */
.sp-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.sp-modal.is-open { display: block; }

.sp-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: sp-fade-in .2s ease;
}

.sp-modal-box {
    position: relative;
    margin: 8vh auto 0;
    max-width: 440px;
    width: calc(100% - 32px);
    background: #fff;
    color: #111;
    border-radius: 16px;
    padding: 28px 28px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: sp-slide-up .25s ease;
    box-sizing: border-box;
}

@keyframes sp-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sp-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sp-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 0;
    font-size: 26px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
    border-radius: 6px;
}
.sp-modal-close:hover { color: #111; background: #f3f4f6; }

.sp-modal-box h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}
.sp-modal-sub {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
}

.sp-field { display: block; margin-bottom: 14px; }
.sp-field span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}
.sp-field input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
    color: #111;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.sp-field input:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

/* Phone field: country-code hint */
.sp-field-hint {
    margin: 8px 0 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
    font-weight: 400;
}
.sp-field-hint strong {
    color: #4b5563;
    font-weight: 600;
}
.sp-field-hint code {
    display: inline;
    font-size: 0.95em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f3f4f6;
    color: #1f2937;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 500;
}
.sp-field--phone {
    margin-bottom: 10px;
}

.sp-error {
    color: #dc2626;
    font-size: 14px;
    margin: 4px 0 10px;
    min-height: 20px;
}

.sp-submit {
    width: 100%;
    padding: 13px 16px;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    transition: opacity .15s;
}
.sp-submit:hover:not(:disabled) { opacity: 0.95; }
.sp-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.sp-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sp-spin 0.8s linear infinite;
}
.sp-submit.is-loading .sp-spinner { display: inline-block; }
.sp-submit.is-loading .sp-submit-text { opacity: 0.85; }

@keyframes sp-spin { to { transform: rotate(360deg); } }

.sp-secure {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    margin: 14px 0 0;
}

@media (max-width: 480px) {
    .sp-modal-box { margin-top: 4vh; padding: 24px 20px 18px; }
    .sp-modal-box h3 { font-size: 18px; }
}
