/* Custom CRM Form Card Wrapper */
.saas-crm-custom-form-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* Form Typography & Structure */
.saas-crm-custom-form-wrapper h3 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.saas-crm-desc {
    margin: 0 0 24px 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.saas-crm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.saas-crm-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #0f172a;
    margin-top: 15px;
}

/* Fields & Controls */
.saas-crm-custom-form-wrapper input[type="text"],
.saas-crm-custom-form-wrapper input[type="email"],
.saas-crm-custom-form-wrapper input[type="tel"],
.saas-crm-custom-form-wrapper input[type="url"],
.saas-crm-custom-form-wrapper select,
.saas-crm-custom-form-wrapper textarea {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    box-sizing: border-box;
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    transition: border-color 0.15s ease;
}

.saas-crm-custom-form-wrapper input:focus,
.saas-crm-custom-form-wrapper select:focus,
.saas-crm-custom-form-wrapper textarea:focus {
    border-color: #0022ff;
    outline: none;
}

.saas-crm-custom-form-wrapper textarea {
    height: 100px;
    resize: vertical;
}

.saas-crm-custom-form-wrapper select {
    cursor: pointer;
}

/* Checkbox & Radio Selections */
.saas-crm-options-grid {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.saas-crm-option-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.saas-crm-option-label:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.saas-crm-option-label.selected,
.saas-crm-option-label:has(input:checked) {
    background: #f4f4ff;
    border-color: #a6b8f7;
    color: #0f172a;
}

.saas-crm-option-label input {
    width: auto !important;
    margin: 0;
    cursor: pointer;
}

/* Custom radio inputs styling */
.saas-crm-option-label input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background-color 0.2s;
    background-color: #fff;
    position: relative;
    box-sizing: border-box;
}

.saas-crm-option-label input[type="radio"]:checked {
    border-color: #0022ff;
}

.saas-crm-option-label input[type="radio"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #0022ff;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
}

.saas-crm-option-label input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Custom checkbox inputs styling */
.saas-crm-option-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background-color 0.2s;
    background-color: #fff;
    position: relative;
    box-sizing: border-box;
}

.saas-crm-option-label input[type="checkbox"]:checked {
    border-color: #0022ff;
    background-color: #0022ff;
}

.saas-crm-option-label input[type="checkbox"]::before {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) translate(0.5px, -0.5px) scale(0);
    transition: transform 0.2s ease-in-out;
    display: block;
}

.saas-crm-option-label input[type="checkbox"]:checked::before {
    transform: rotate(-45deg) translate(0.5px, -0.5px) scale(1);
}

/* Hover & Focus state */
.saas-crm-option-label:hover input[type="radio"],
.saas-crm-option-label:hover input[type="checkbox"] {
    border-color: #94a3b8;
}

.saas-crm-option-label input[type="radio"]:focus-visible,
.saas-crm-option-label input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 34, 255, 0.2);
}

/* Form Action Buttons */
.saas-crm-dynamic-form .submit-btn {
    background: #0022ff;
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.1s ease;
    width: 100%;
    outline: none;
    margin-top: 20px;
}

.saas-crm-dynamic-form .submit-btn:hover {
    background: #001ad4;
}

.saas-crm-dynamic-form .submit-btn:active {
    transform: scale(0.98);
}

.saas-crm-dynamic-form .submit-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.saas-crm-dynamic-form .form-status-msg {
    display: none;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Success Card UI Layout */
.saas-crm-success-content {
    text-align: center;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.saas-crm-success-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    font-family: inherit;
    letter-spacing: -0.01em;
}

.saas-crm-success-content p {
    margin: 0 0 28px 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 360px;
    font-family: inherit;
}

.saas-crm-success-btn-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
}

/* Close Absolute Button */
.saas-crm-success-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    outline: none;
    transition: color 0.2s;
}

.saas-crm-success-close-btn:hover {
    color: #0f172a;
}

/* Success Action Buttons */
.saas-crm-success-btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #10b981;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
}

.saas-crm-success-btn-download:hover {
    background: #059669;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.saas-crm-success-btn-calendar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0022ff;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(0, 34, 255, 0.35);
    transition: all 0.2s ease;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
}

.saas-crm-success-btn-calendar:hover {
    background: #001ad4;
    box-shadow: 0 6px 18px rgba(0, 34, 255, 0.45);
}

.saas-crm-success-enhanced-cta-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
}

.saas-crm-success-enhanced-cta-title {
    margin: 0 0 4px 0;
    color: #64748b;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.saas-crm-success-enhanced-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0d9488;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
    transition: all 0.2s ease;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
}

.saas-crm-success-enhanced-cta-btn:hover {
    background: #0f766e;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.saas-crm-success-btn-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 12px 36px;
    border-radius: 50px;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    transition: all 0.2s ease;
    width: 100%;
    max-width: 200px;
}

.saas-crm-success-btn-continue:hover {
    background: #2563eb;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.45);
}