/* Shared Form Styles - AvePoint Style Guide */
:root {
    --avepoint-orange: #FF5A4E;
    --avepoint-orange-hover: #E04A3E;
    --text-dark: #1A1A1A;
    --text-grey: #666666;
    --bg-light: #F5F7FA;
    --border-color: #E1E4E8;
    --success-green: #065F46;
    --error-red: #991B1B;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Card Container */
.form-card {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin: 20px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-grey);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-dark);
}

/* Header */
.card-header {
    margin-bottom: 32px;
    text-align: left;
}

.card-header.centered {
    text-align: center;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.card-subtitle {
    color: var(--text-grey);
    font-size: 14px;
    margin: 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label .required {
    color: var(--error-red);
}

.form-label .optional {
    color: var(--text-grey);
    font-weight: 400;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--avepoint-orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 78, 0.1);
}

.form-control::placeholder {
    color: #999;
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* Custom scrollable select dropdown */
.custom-select-wrapper {
    position: relative;
}

.custom-select-trigger {
    display: block;
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
    user-select: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.custom-select-trigger.placeholder {
    color: #999;
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--avepoint-orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 78, 0.1);
}

.custom-select-trigger.open {
    border-color: var(--avepoint-orange);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 0 0 3px rgba(255, 90, 78, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ff5a4e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 11 6-6 6 6'/%3e%3c/svg%3e");
}

.custom-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid var(--avepoint-orange);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-select-options.open {
    display: block;
}

.custom-select-option {
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.15s;
}

.custom-select-option:hover {
    background-color: #fff5f4;
}

.custom-select-option.selected {
    background-color: #ffe9e7;
    font-weight: 500;
    color: var(--avepoint-orange, #ff5a4e);
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 10px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--avepoint-orange);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-wrapper label {
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Thumbs Buttons */
.thumbs-container {
    display: flex;
    gap: 16px;
}

.thumb-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-grey);
    background: white;
    font-size: 14px;
    font-weight: 500;
}

.thumb-btn:hover {
    background-color: #f0f0f0;
}

.thumb-btn.selected {
    border-color: var(--avepoint-orange);
    color: var(--avepoint-orange);
    background-color: rgba(255, 90, 78, 0.05);
}

.thumb-btn svg {
    width: 20px;
    height: 20px;
}

/* Submit Button */
.btn-submit {
    width: 320px;
    max-width: 100%;
    height: 50px;
    padding: 13px 16px;
    background-color: var(--avepoint-orange);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: var(--avepoint-orange-hover);
}

.btn-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Success Card (post-submission) */
.success-card {
    background-color: #F5F7FA;
    border-radius: 12px;
    padding: 48px 40px;
    text-align: center;
    max-width: 560px;
}

.success-icon {
    margin-bottom: 16px;
}

.success-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.success-description {
    font-size: 14px;
    color: var(--text-grey);
    margin: 0;
    line-height: 1.5;
}

/* Footer */
.form-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.privacy-link {
    color: #494F5A;
    text-decoration: none;
    font-size: 16px;
    line-height: 24px;
}

.privacy-link:hover {
    color: #494F5A;
}

/* Reasons/Options Section */
.options-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}
