/* ═══════════════════════════════════════════════════════
   Contact Form by Pro Media Mogul — Frontend Styles v2
   Clean, card-based design matching CRM Online aesthetic
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Card Container ── */
.pmm-form-wrapper {
    max-width: 480px;
    margin: 30px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.pmm-form-wrapper *,
.pmm-form-wrapper *::before,
.pmm-form-wrapper *::after {
    box-sizing: border-box;
}

.pmm-form-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07), 0 0 1px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ── Header Area ── */
.pmm-form-card .pmm-form-header {
    text-align: center;
    padding: 28px 28px 20px;
    background: linear-gradient(180deg, #f6f8ff 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f2f8;
}

.pmm-form-card .pmm-form-header img {
    max-width: 90px;
    max-height: 44px;
    display: block;
    margin: 0 auto 10px;
}

.pmm-form-card .pmm-form-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(91, 74, 158, 0.18);
}

.pmm-form-card .pmm-form-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.pmm-form-card .pmm-form-header p {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
}

/* ── Form Body ── */
.pmm-form-card .pmm-form-body {
    padding: 22px 28px 6px;
}

/* ── Field Groups ── */
.pmm-form-card .pmm-field-group {
    margin-bottom: 16px;
}

.pmm-form-card .pmm-field-group > label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
}

.pmm-form-card .pmm-required {
    color: #ef4444;
    font-weight: 600;
}

/* ── Inputs — clean underline style ── */
.pmm-form-card .pmm-field-group input[type="text"],
.pmm-form-card .pmm-field-group input[type="email"],
.pmm-form-card .pmm-field-group input[type="tel"],
.pmm-form-card .pmm-field-group input[type="url"],
.pmm-form-card .pmm-field-group input[type="number"],
.pmm-form-card .pmm-field-group select,
.pmm-form-card .pmm-field-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.15s ease;
    outline: none;
}

.pmm-form-card .pmm-field-group input::placeholder,
.pmm-form-card .pmm-field-group textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.pmm-form-card .pmm-field-group input:focus,
.pmm-form-card .pmm-field-group select:focus,
.pmm-form-card .pmm-field-group textarea:focus {
    background: #fff;
    border-color: var(--pmm-accent, #5b4a9e);
    box-shadow: 0 0 0 3px rgba(91, 74, 158, 0.06);
}

.pmm-form-card .pmm-field-group input.pmm-field-invalid,
.pmm-form-card .pmm-field-group textarea.pmm-field-invalid,
.pmm-form-card .pmm-field-group select.pmm-field-invalid {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06);
}

.pmm-form-card .pmm-field-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.pmm-form-card .pmm-field-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.pmm-form-card .pmm-field-error {
    font-size: 11px;
    color: #ef4444;
    margin-top: 3px;
    min-height: 0;
    font-weight: 500;
}

/* ── Two-column row (for side-by-side fields) ── */
.pmm-form-card .pmm-field-row {
    display: flex;
    gap: 10px;
}
.pmm-form-card .pmm-field-row .pmm-field-group {
    flex: 1;
}

/* ── Checkbox ── */
.pmm-form-card .pmm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400 !important;
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.pmm-form-card .pmm-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-top: 1px;
    accent-color: var(--pmm-accent, #5b4a9e);
    flex-shrink: 0;
}

/* ── Dropzone ── */
.pmm-form-card .pmm-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #f8fafc;
}

.pmm-form-card .pmm-dropzone:hover,
.pmm-form-card .pmm-dropzone.pmm-dragover {
    border-color: var(--pmm-accent, #5b4a9e);
    background: #f5f3ff;
}

.pmm-form-card .pmm-dropzone-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
    opacity: 0.6;
}

.pmm-form-card .pmm-dropzone-message p {
    margin: 2px 0;
    font-size: 12px;
    color: #64748b;
}

.pmm-form-card .pmm-dropzone-message small {
    color: #94a3b8;
    font-size: 10px;
}

.pmm-form-card .pmm-dropzone-browse {
    color: var(--pmm-accent, #5b4a9e);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.pmm-form-card .pmm-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pmm-form-card .pmm-file-list {
    margin-top: 6px;
}

.pmm-form-card .pmm-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-bottom: 3px;
    font-size: 11px;
    border: 1px solid #e2e8f0;
}

.pmm-form-card .pmm-file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-weight: 500;
}

.pmm-form-card .pmm-file-item-size {
    color: #94a3b8;
    margin-left: 10px;
    font-size: 10px;
    flex-shrink: 0;
}

.pmm-form-card .pmm-file-hint {
    font-weight: 400;
    font-size: 10px;
    color: #94a3b8;
}

/* ── Submit Area ── */
.pmm-form-card .pmm-form-footer {
    padding: 2px 28px 24px;
}

.pmm-form-card .pmm-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 10px rgba(91, 74, 158, 0.22);
}

.pmm-form-card .pmm-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(91, 74, 158, 0.3);
    filter: brightness(1.05);
}

.pmm-form-card .pmm-submit-btn:active {
    transform: translateY(0);
}

.pmm-form-card .pmm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Spinner ── */
.pmm-form-card .pmm-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pmm-spin 0.6s linear infinite;
}

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

/* ── Success Message ── */
.pmm-form-card .pmm-form-success {
    text-align: center;
    padding: 50px 28px;
}

.pmm-form-card .pmm-success-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    font-size: 26px;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #4ade80);
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 14px;
    animation: pmm-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

@keyframes pmm-pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.pmm-form-card .pmm-form-success h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.pmm-form-card .pmm-form-success p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* ── Error Message ── */
.pmm-form-card .pmm-form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 14px;
    color: #dc2626;
    font-size: 13px;
    margin: 0 28px 10px;
    font-weight: 500;
}

/* ── Branding ── */
.pmm-form-card .pmm-form-branding {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #f1f5f9;
}

.pmm-form-card .pmm-form-branding small {
    font-size: 10px;
    color: #cbd5e1;
    letter-spacing: 0.3px;
}

.pmm-form-card .pmm-form-branding a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.pmm-form-card .pmm-form-branding a:hover {
    color: var(--pmm-accent, #5b4a9e);
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .pmm-form-wrapper {
        margin: 12px 10px;
        max-width: 100%;
    }
    .pmm-form-card .pmm-form-body,
    .pmm-form-card .pmm-form-footer {
        padding-left: 18px;
        padding-right: 18px;
    }
    .pmm-form-card .pmm-form-header {
        padding: 20px 18px 16px;
    }
    .pmm-form-card .pmm-field-row {
        flex-direction: column;
        gap: 0;
    }
}
