/* Apply consistent borders and small radius to all form inputs */
.asana-dynamic-form input[type="text"],
.asana-dynamic-form input[type="date"],
.asana-dynamic-form input[type="email"], /* <-- Added */
.asana-dynamic-form select {
    border: 1px solid #d1d5db; /* Tailwind gray-300 */
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

/* Optional: Improve focus state */
.asana-dynamic-form input:focus,
.asana-dynamic-form select:focus {
    outline: none;
    border-color: #2563eb; /* Tailwind blue-600 */
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Adjust labels for spacing */
.asana-dynamic-form label {
    display: block;

}

/* Conditional field blocks */
label[data-field-id] {
    margin-bottom: 2rem;
}

/* Upload blocks: separate multiple upload options clearly */
.asana-dynamic-form .afb-upload-block {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.asana-dynamic-form .afb-upload-block:last-child {
    margin-bottom: 0;
}

.asana-dynamic-form .afb-upload-block-inner {
    padding: 0.95rem 1rem 1rem;
}

.asana-dynamic-form .afb-upload-header {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 0.55rem;
    margin-bottom: 0.35rem;
}

.asana-dynamic-form .afb-upload-required-badge {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.asana-dynamic-form .afb-upload-block .upload-fields {
    margin-top: 0.5rem;
}

.asana-dynamic-form .afb-upload-file-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.asana-dynamic-form .afb-upload-file-row .file-input {
    flex: 1 1 auto;
    min-width: 0;
}

.asana-dynamic-form .afb-upload-file-meta {
    flex: 0 0 auto;
    min-width: 240px;
    max-width: 420px;
    line-height: 1.35;
    text-align: right;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

@media (max-width: 768px) {
    .asana-dynamic-form .afb-upload-file-row {
        flex-wrap: wrap;
    }

    .asana-dynamic-form .afb-upload-file-meta {
        order: 2;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-left: 0;
        text-align: left;
    }

    .asana-dynamic-form .afb-upload-file-row .remove-file-btn {
        order: 3;
    }
}

/* Submit button styling */
.asana-dynamic-form button[type="submit"] {
    background-color: #2563eb;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
    border: none;
}

.asana-dynamic-form button[type="submit"]:hover {
    background-color: #1e40af;
}

/* Form container spacing and mobile layout (no border) */
.asana-form-wrapper {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
    border: none; /* No border on mobile */
    border-radius: 10px !important;
}

/* Desktop layout (add border and width constraint) */
@media (min-width: 768px) {
    .asana-form-wrapper {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
        border: 1px solid #d1d5db; /* Tailwind gray-300 */
        border-radius: 6px;
        padding: 2em !important;
    }
}

/* Match textarea to input styling */
.asana-dynamic-form textarea {
    border: 1px solid #d1d5db; /* Tailwind gray-300 */
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    resize: none; /* Optional: prevent manual resizing */
    line-height: 1.25;
}

/* Optional: Improve focus state */
.asana-dynamic-form textarea:focus {
    outline: none;
    border-color: #2563eb; /* Tailwind blue-600 */
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Paragraph-mode custom fields must stay visibly multiline on load. */
.asana-dynamic-form textarea.afb-paragraph-input {
    min-height: 8rem;
    line-height: 1.5;
    resize: vertical;
}

/* Single-input textarea mode: compact by default, but resizable like a textarea. */
.asana-dynamic-form textarea.afb-single-input-textarea {
    min-height: 200px;
    height: 200px;
    resize: vertical;
    line-height: 1.35;
}

/* AFB progress bar */
.afb-progress-container{overflow:hidden}
.afb-progress-bar{background:#2563eb; width:0%; transition:width .25s ease}
.afb-progress-bar--indeterminate{position:relative; width:100%}
.afb-progress-bar--indeterminate::before{
  content:""; position:absolute; left:-40%; width:40%; height:100%;
  background: currentColor; opacity:.9; animation: afb-indet 1.2s infinite linear
}
@keyframes afb-indet{0%{left:-40%}100%{left:100%}}

/* Success card makeover (post-submit) */
.afb-success-card {
    max-width: 900px;
    margin: 1rem auto 0;
    padding: 1.5rem 1.25rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.08);
    text-align: center;
    color: #0f172a;
    font-family: inherit;
}

.afb-success-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.afb-success-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: all 0.18s ease;
}

.afb-success-home-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    transform: translateY(-1px);
}

.afb-success-brand-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.45rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.afb-success-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.afb-success-headline-wrap {
    margin: 0 0 0.85rem;
}

.afb-success-kicker {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.afb-success-task-name {
    margin: 0.45rem 0 0;
    font-size: 1.15rem;
    font-weight: 650;
    color: #1e293b;
}

.afb-success-copy {
    max-width: 760px;
    margin: 0.8rem auto 0;
    display: grid;
    gap: 0.65rem;
    color: #334155;
    line-height: 1.65;
}

.afb-success-copy p {
    margin: 0;
    font-size: 1.03rem;
}

.afb-success-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.afb-success-request-block {
    margin: 0.6rem auto 0;
    padding: 0.9rem 1rem;
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #dbe5ef;
    border-radius: 0.9rem;
}

.afb-success-request-label {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.afb-success-request-id {
    margin: 0.45rem 0 0;
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.afb-success-action-row {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.afb-success-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #1e3a5f;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.afb-success-secondary-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.afb-success-email-form {
    margin-top: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.afb-success-feedback {
    color: #0f766e;
    font-size: 0.85rem;
    font-weight: 600;
}

.afb-success-warning {
    margin: 0.75rem 0 0;
    color: #9a3412;
    font-size: 0.86rem;
}

@media (max-width: 768px) {
    .afb-success-card {
        padding: 1.1rem 0.85rem;
        border-radius: 1.1rem;
    }

    .afb-success-brand-row {
        margin-bottom: 0.95rem;
    }

    .afb-success-kicker {
        font-size: 1.3rem;
    }

    .afb-success-title {
        font-size: 1.55rem;
    }

    .afb-success-task-name {
        font-size: 1rem;
    }

    .afb-success-request-id {
        font-size: 1.2rem;
    }

    .afb-success-copy p {
        font-size: 0.96rem;
    }
}


