/* Ansøgninger page – Dynamic Application Forms */

.ansogninger-main {
    padding: 6rem 0 4rem;
    min-height: 100vh;
}

.ansogninger-main .page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-align: center;
}

.ansogninger-main .page-intro {
    color: var(--gray-light);
    text-align: center;
    margin-bottom: 2rem;
}

/* Staff Review Section */
.staff-review-section {
    background: var(--gray-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.staff-review-section .app-form-label {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
}

/* Tabs */
.app-forms-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-forms-tab {
    background: none;
    border: none;
    color: var(--gray-light);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.app-forms-tab:hover {
    color: var(--white);
}

.app-forms-tab.active {
    color: var(--akendia-green);
    border-bottom-color: var(--akendia-green);
}

/* Login required gate */
.app-forms-login-required {
    text-align: center;
    padding: 4rem 1.5rem;
}

.app-forms-login-required-inner {
    max-width: 360px;
    margin: 0 auto;
    background: var(--gray-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2.5rem;
}

.app-forms-login-required-inner i {
    font-size: 3rem;
    color: var(--gray-light);
    margin-bottom: 1.25rem;
    display: block;
}

.app-forms-login-required-inner p {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.app-forms-login-required-inner .btn {
    display: inline-block;
}

/* Loading / Empty */
.app-forms-loading,
.app-forms-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-light);
}

/* Forms List */
.app-forms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.app-form-card {
    background: var(--charcoal);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.app-form-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.app-form-card--open:hover {
    border-color: var(--akendia-green);
    box-shadow: 0 0 0 1px rgba(0, 255, 102, 0.2);
}

.app-form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.app-form-card-icon {
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
    color: var(--akendia-green);
    font-size: 1.25rem;
}

.app-form-card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    flex: 1;
    min-width: 0;
}

.app-form-status {
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--black);
    white-space: nowrap;
    flex-shrink: 0;
}

.app-form-status--locked {
    flex-shrink: 0;
}

.app-form-card-desc {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    flex: 1;
}

.app-form-card-approved-msg {
    color: var(--gray-light);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.app-form-card--approved .app-form-card-approved-msg {
    color: var(--akendia-green);
    font-weight: 500;
}

.app-form-card-last-status {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.app-form-status--inline {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.app-form-card-meta {
    color: var(--gray-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.app-form-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.app-form-card-actions--single {
    justify-content: center;
}

.app-form-card-actions--single .app-form-card-btn {
    width: 100%;
    min-width: 140px;
}

.app-form-card-btn {
    margin-top: 0;
}

.app-form-card-actions .app-form-card-btn {
    width: auto;
}

/* Modal */
.app-form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.app-form-modal-overlay.hidden {
    display: none;
}

.app-form-modal {
    background: var(--gray-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.app-form-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-form-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.app-form-modal-close {
    background: none;
    border: none;
    color: var(--gray-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.app-form-modal-close:hover {
    color: var(--white);
}

.app-form-modal-body {
    padding: 1.5rem;
}

.app-form-description {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Form Fields */
.app-form-field {
    margin-bottom: 1.5rem;
}

.app-form-label {
    display: block;
    color: var(--white);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.app-form-input,
.app-form-field textarea,
.app-form-field select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.app-form-input:focus,
.app-form-field textarea:focus,
.app-form-field select:focus {
    outline: none;
    border-color: var(--akendia-green);
    background-color: rgba(255, 255, 255, 0.08);
}

.app-form-field select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300ff88' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.app-form-field select option {
    background: var(--gray-dark);
    color: var(--white);
    padding: 0.5rem;
}

.app-form-field select:not([multiple]) {
    cursor: pointer;
}

.app-form-field select:not([multiple]):hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Ensure dropdown options are visible */
.app-form-field select option:checked {
    background: var(--akendia-green);
    color: var(--white);
}

.app-form-field select option:hover {
    background: rgba(0, 255, 136, 0.2);
}

/* Status dropdown in review modals */
.app-form-modal-body select,
#staff-submission-review-status,
#app-submission-review-status {
    width: 100%;
    padding: 0.75rem 2rem 0.75rem 0.75rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.app-form-modal-body select option,
#staff-submission-review-status option,
#app-submission-review-status option {
    background: var(--gray-dark);
    color: var(--white);
    padding: 0.5rem;
}

/* Custom status dropdown (replaces native select in modals for visible options) */
.app-status-dropdown-trigger:hover {
    background: rgba(255,255,255,0.12) !important;
}
.app-status-dropdown-list button:hover {
    background: rgba(0, 255, 136, 0.15) !important;
}
.app-status-dropdown-list button[data-value] {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.app-status-dropdown-list button[data-value]:last-child {
    border-bottom: none;
}

.app-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.app-form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-form-radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-form-radio-item input[type="radio"] {
    width: auto;
    margin: 0;
}

.app-form-radio-item label {
    color: var(--gray-light);
    font-weight: normal;
    margin: 0;
    cursor: pointer;
}

.app-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Submission Details */
.app-submission-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1rem;
}

.app-submission-meta {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.app-submission-responses {
    margin-top: 1rem;
}

.app-submission-response {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.app-submission-response strong {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}

.app-submission-response span {
    color: var(--gray-light);
    white-space: pre-wrap;
}

.nav-active {
    color: var(--red-primary) !important;
}
