/* ==========================================
   FORMS
   Shared form styles for all forms site-wide
   ========================================== */

.form-container {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--box-radius);
    box-shadow: var(--box-shadow);
}

@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem;
    }
}
.dashboard-form-transparent{
    background: transparent;
    padding: 1.5rem;
    border-radius: var(--box-radius);
    margin-top: 1rem;
}

.dashboard-form {
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--box-radius);
    margin-top: 1rem;
}

.dashboard-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--grey-border);
}

.dashboard-form-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.dashboard-form-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.75rem;
}

.front-form-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.8rem;
}

.dashboard-form-sub-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dashboard-form-group {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Search input with icon */
.dashboard-form-search-wrapper {
    position: relative;
    flex: 1;
}

.dashboard-form-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.dashboard-form-search-wrapper .dashboard-form-input {
    padding-left: 2.5rem;
}

.dashboard-form-label {
    font-weight: 500;
}

.dashboard-form-input.dashboard-form-input-checkbox {
    border: none;
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--grey-border);
    border-radius: var(--box-radius);
    font-family: inherit;
    background: transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dashboard-form-input:focus {
    outline: none;
    border-color: var(--branding-blue);
    box-shadow: var(--box-shadow);
}

.dashboard-form-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--grey-border);
    border-radius: var(--box-radius);
    font-family: inherit;
    color: var(--text-dark);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dashboard-form-select:focus {
    outline: none;
    border-color: var(--branding-blue);
    box-shadow: 0 0 0 3px rgba(42, 47, 107, 0.1);
}

.dashboard-form-upload {
    width: 100%;
    font-family: inherit;
    cursor: pointer;
    padding: 0.7rem;
    border: 1px dashed var(--grey-border);
    background: var(--blur);
    border-radius: var(--box-radius);
}

.dashboard-form-help {
    color: var(--text-grey-light);
}

.dashboard-form-errors {
    background-color: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--box-radius);
    color: var(--cancelled);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

.dashboard-form-error {
    color: var(--danger);
    margin-top: 0.25rem;
}

/* Image upload preview */
.image-preview-item {
    position: relative;
}

.image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--grey-border);
}

.remove-preview-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: var(--white);
    border: 2px solid var(--white);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.remove-preview-btn:hover {
    opacity: 0.8;
}

.dashboard-form-image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.dashboard-form-image-item {
    position: relative;
}

.dashboard-form-image-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--grey-border);
}

.dashboard-form-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: var(--white);
    border: 2px solid var(--white);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.dashboard-form-image-remove:hover {
    opacity: 0.8;
}

/* ==========================================
   STANDALONE FORM PAGES
   ========================================== */

.form-page-section {
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    background-color: var(--light);
}

.form-page-container {
    max-width: 900px;
    margin: 0 auto;
}

.form-page-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--box-radius);
    padding: 3rem 2.5rem;
    box-shadow: var(--box-shadow);
}

.form-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.form-page-title {
    font-size: 2rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--grey-border);
}

.auth-link {
    font-size: 0.95rem;
    color: var(--branding-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--branding-gold);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .form-page-card {
        padding: 2rem 1.5rem;
    }

    .form-page-title {
        font-size: 1.75rem;
    }
}

.under-table {
    padding: 2rem;
}

.btn-dashboard {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--box-radius);
    font-size: 0.85rem;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-dashboard:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-2px);
}

.dashboard-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--grey-border);
}

@media (max-width: 768px) {
    .dashboard-form-sub-section {
        flex-direction: column;
    }
}

/* ===== Menu Item Search ===== */
.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: var(--box-radius);
    max-height: 240px;
    overflow-y: auto;
    box-shadow: var(--box-shadow);
    z-index: 200;
    display: none;
}

.no-results {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--text-grey-light);
    font-style: italic;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--grey-border);
    transition: background 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--branding-blue-bg);
}

.search-result-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--text-grey-light);
}

.new-items-container {
    display: none;
}

/* ===== Staged Items ===== */
.staged-additions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.staged-empty {
    margin: 0;
    font-size: inherit;
    color: var(--text-grey-light);
    font-style: italic;
}

.staged-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--branding-blue-bg);
    border: 1px solid var(--grey-border);
    border-radius: var(--box-radius);
}

.staged-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    flex: 1;
}

.staged-item-images {
    display: flex;
    gap: 0.25rem;
    margin: 0 1rem;
}

.staged-item-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--box-radius);
    border: 1px solid var(--grey-border);
}

.staged-item-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.staged-quantity-input {
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--grey-border);
    border-radius: var(--box-radius);
    text-align: center;
}

.btn-icon-remove {
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-grey-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.btn-icon-remove:hover {
    color: var(--cancelled);
}

.btn-icon-remove svg {
    fill: currentColor;
    pointer-events: none;
}

/* ===== Service Tabs ===== */
.service-tabs-container {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: var(--box-radius);
}

.service-tab-headers {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--grey-border);
}

.service-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-grey);
    cursor: pointer;
    transition: all 0.2s;
}

.service-tab-btn:hover {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.02);
}

.service-tab-btn.active {
    color: var(--branding-blue);
    border-bottom-color: var(--branding-blue);
    font-weight: 600;
}

.service-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.service-tab-content.active {
    display: block;
}

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

@media (max-width: 768px) {
    .service-tab-headers {
        flex-direction: column;
        border-bottom: none;
        border-left: 3px solid var(--grey-border);
    }

    .service-tab-btn {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .service-tab-btn.active {
        border-bottom-color: transparent;
        border-left-color: var(--branding-blue);
    }
}
