:root {
      --primary-color: #e9cdb3;
      --primary-color-hover: #059669;
      --primary-color-focus: 16, 185, 129;
      --form-bg-color: #ffffff;
      --form-text-color: #000000;
      --response-bg-color: #e8f5e9;
      --border-radius: 0.375rem;
      --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      --transition-duration: 0.2s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    /* background-color: #f8f9fa; */
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.form-header {
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    /* position: relative; */
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    margin-top: 2rem;
}

/* .form-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to right bottom, rgba(0,0,0,0.1) 50%, transparent 50%);
} */

.form-content {
    padding: 2rem;
    background-color: var(--form-bg-color);
    color: var(--form-text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--form-text-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: border-color var(--transition-duration) ease-in-out, box-shadow var(--transition-duration) ease-in-out;
}

.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-focus), 0.25);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.5rem;
}

.form-check-input {
    float: left;
    margin-left: -1.5em;
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    color-adjust: exact;
    transition: background-color var(--transition-duration) ease-in-out, background-position var(--transition-duration) ease-in-out, border-color var(--transition-duration) ease-in-out, box-shadow var(--transition-duration) ease-in-out;
}

.form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-label {
    color: var(--form-text-color);
}

.checkbox-group,
.radio-group {
    margin-top: 0.5rem;
}

.required {
    color: #dc3545;
    margin-left: 4px;
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #6c757d;
}

.btn {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: color var(--transition-duration) ease-in-out, background-color var(--transition-duration) ease-in-out, border-color var(--transition-duration) ease-in-out, box-shadow var(--transition-duration) ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
}

.btn-primary:focus {
    color: #fff;
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-focus), 0.5);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-lg {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
}

.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: calc(1.5em + 1.5rem + 2px);
    margin-bottom: 0;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 1.5rem + 2px);
    margin: 0;
    opacity: 0;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(1.5em + 1.5rem + 2px);
    padding: 0.75rem 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6c757d;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-duration) ease-in-out, border-color var(--transition-duration) ease-in-out, box-shadow var(--transition-duration) ease-in-out;
}

.custom-file-input:focus ~ .custom-file-label {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-focus), 0.25);
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    height: calc(1.5em + 1.5rem);
    padding: 0.75rem 1rem;
    line-height: 1.5;
    color: #fff;
    content: "Browse";
    background-color: var(--primary-color);
    border-left: inherit;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Audio recorder styles */
.audio-recorder {
    display: flex;
    flex-direction: column;
}

.record-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.record-button.recording {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.record-status {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Custom switch styles */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 2.5rem;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0;
}

.custom-switch .custom-control-label::before {
    left: -2.25rem;
    width: 1.75rem;
    pointer-events: all;
    border-radius: 0.875rem;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    background-color: #fff;
    transform: translateX(0.75rem);
}

.custom-switch .custom-control-label::after {
    top: calc(0.25rem + 2px);
    left: calc(-2.25rem + 2px);
    width: calc(1rem - 4px);
    height: calc(1rem - 4px);
    background-color: #adb5bd;
    border-radius: 0.5rem;
    transition: transform var(--transition-duration) ease-in-out, background-color var(--transition-duration) ease-in-out;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: 1px solid #adb5bd;
}

.custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.form-switch-wrapper {
    padding: 0.75rem 1rem;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
    width: 100%;
    }
    
    .form-header,
    .form-content {
    padding: 1.5rem;
    }
    
    .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    }
}

/* Progress bar for form submission */
.progress {
    display: none;
    height: 4px;
    overflow: hidden;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    margin-top: 1rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

/* Form submission status */
.form-status {
    display: none;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: var(--border-radius);
}

.form-status.success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.form-status.error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* HTML content styling */
.html-content {
    /* background-color: rgba(0, 0, 0, 0.03); */
    border-radius: var(--border-radius);
    padding: 1rem;
}

.html-content p {
    margin-bottom: 1rem;
}

.html-content p:last-child {
    margin-bottom: 0;
}

.html-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.html-content a:hover {
    text-decoration: underline;
}

/* Webhook response message */
.webhook-response {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background-color: var(--response-bg-color);
    animation: fadeIn 0.5s ease-out;
}

.webhook-response h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.webhook-response-content {
    white-space: pre-wrap;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.w-100 {
    width: 100%;
}

.bg-light {
    /* background-color: #f8f9fa; */
}

.rounded {
    border-radius: var(--border-radius);
}

.p-3 {
    padding: 1rem;
}

.file-upload-container {
    width: 100%;
    margin-bottom: 0.5rem;
}

.file-drop-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 150px;
    padding: 1.5rem;
    border: 2px dashed #ced4da;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-drop-area:hover,
.file-drop-area.is-active {
    background-color: rgba(var(--primary-color-focus), 0.05);
    border-color: var(--primary-color);
}

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

.file-drop-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.plus-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: #adb5bd;
    transition: color 0.3s ease;
}

.file-drop-area:hover .plus-icon {
    color: var(--primary-color);
}

.file-drop-message p {
    margin: 0;
    font-size: 0.875rem;
}

.selected-files {
    margin-top: 0.75rem;
}

.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.selected-file:last-child {
    margin-bottom: 0;
}

.file-info {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.file-icon {
    margin-right: 0.5rem;
    color: #6c757d;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-remove {
    margin-left: 0.5rem;
    padding: 0.25rem;
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.file-remove:hover {
    opacity: 1;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 1rem;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .file-type {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Simple Modal Styles */
.modal {
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background: #fff;
  padding: 2em 2em 1.5em 2em;
  border-radius: 8px;
  text-align: center;
  max-width: 90vw;
  box-shadow: 0 2px 24px rgba(0,0,0,0.2);
}