/* =============================================================================
   TTPixel CM — Public Client Form CSS
   ============================================================================= */

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

.ttcm-form-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ttcm-form-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(99,102,241,.12), 0 4px 20px rgba(0,0,0,.06);
    overflow: hidden;
    border: 1px solid #e0e7ff;
}

/* Header */
.ttcm-form-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 36px 40px;
    text-align: center;
}

.ttcm-form-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -.3px;
}

.ttcm-form-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,.8);
    margin: 0;
}

/* Sections */
.ttcm-form-section {
    padding: 28px 36px;
    border-bottom: 1px solid #f1f5f9;
}

.ttcm-form-section:last-of-type { border-bottom: none; }

.ttcm-form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #4f46e5;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e7ff;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Rows & Fields */
.ttcm-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .ttcm-form-header  { padding: 28px 24px; }
    .ttcm-form-section { padding: 22px 24px; }
    .ttcm-form-row     { grid-template-columns: 1fr; }
    .ttcm-form-title   { font-size: 20px; }
}

.ttcm-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ttcm-form-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ttcm-form-label .req { color: #ef4444; }

.ttcm-form-input {
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all .2s ease;
    background: #fff;
    color: #1e293b;
    width: 100%;
    box-sizing: border-box;
}

.ttcm-form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.ttcm-form-input.error { border-color: #ef4444; }

.ttcm-form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236366f1'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.ttcm-form-textarea {
    min-height: 110px;
    resize: vertical;
}

.ttcm-form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0;
    line-height: 1.5;
}

.ttcm-form-error {
    font-size: 11px;
    color: #ef4444;
    font-weight: 600;
    min-height: 16px;
}

/* Alert */
.ttcm-form-alert {
    margin: 0 36px 16px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ttcm-form-alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.ttcm-form-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }

/* Submit Button */
.ttcm-form-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 72px);
    margin: 0 36px 20px;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s ease;
    letter-spacing: .2px;
    box-shadow: 0 6px 20px rgba(99,102,241,.4);
}

.ttcm-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99,102,241,.5);
}

.ttcm-form-btn:active { transform: translateY(0); }
.ttcm-form-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.ttcm-form-privacy {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin: 0 36px 28px;
}

/* Success State */
.ttcm-form-success-icon { font-size: 64px; text-align: center; padding: 40px 0 20px; }
.ttcm-form-success-title { text-align: center; font-size: 24px; font-weight: 800; color: #1e293b; margin: 0 0 12px; }
.ttcm-form-success-msg   { text-align: center; font-size: 15px; color: #475569; padding: 0 40px 48px; line-height: 1.7; }
