/* =============================================
   Gerenciador de Contatos WP - Estilos Públicos
   ============================================= */

.wpcm-wrapper {
    max-width: 520px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

.wpcm-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    overflow: hidden;
}

/* Header */
.wpcm-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 36px 40px 30px;
    text-align: center;
}

.wpcm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 14px;
}

.wpcm-title {
    margin: 0 0 6px !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.wpcm-subtitle {
    margin: 0 0 14px !important;
    font-size: 0.95rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.wpcm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: background 0.2s;
}

.wpcm-back-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff !important;
}

/* Form body */
.wpcm-form {
    padding: 32px 40px 36px;
}

/* Alerts */
.wpcm-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    margin: 0 40px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

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

/* Field groups */
.wpcm-field-group {
    margin-bottom: 20px;
}

.wpcm-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.wpcm-required {
    color: #ef4444;
}

.wpcm-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    outline: none;
}

.wpcm-input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.wpcm-input.wpcm-input-error {
    border-color: #ef4444;
    background: #fff5f5;
}

.wpcm-field-error {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #ef4444;
    min-height: 16px;
}

/* Privacy checkbox */
.wpcm-privacy {
    margin-top: 4px;
}

.wpcm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.5;
}

.wpcm-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    flex-shrink: 0;
    cursor: pointer;
}

/* Submit button */
.wpcm-btn {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.wpcm-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.wpcm-btn:active {
    transform: translateY(0);
}

.wpcm-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Spinner animation */
@keyframes wpcm-spin {
    to { transform: rotate(360deg); }
}

.wpcm-spinner {
    animation: wpcm-spin 0.8s linear infinite;
}

/* Success state */
.wpcm-success-state {
    padding: 48px 40px;
    text-align: center;
}

.wpcm-success-icon {
    width: 72px;
    height: 72px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #059669;
}

.wpcm-success-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px !important;
}

.wpcm-success-text {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 !important;
}



/* Responsive */
@media (max-width: 560px) {
    .wpcm-wrapper {
        margin: 16px;
    }
    .wpcm-header {
        padding: 28px 24px 22px;
    }
    .wpcm-form {
        padding: 24px 24px 28px;
    }
    .wpcm-alert {
        margin: 0 24px 16px;
    }
    .wpcm-success-state {
        padding: 36px 24px;
    }
}
