﻿/* Forms CSS - Styling specific to Add, Edit, Delete, and Permission Denied forms */

/* General Styles */
body {
    font-family: 'Roboto', sans-serif; /* Match the font from main.css */
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* -------------------------------------------
   IMPORTANT: Do NOT globally change all forms.
   Bootstrap's grid needs rows' negative margins.
   ------------------------------------------- */

/* If you need a stacked/narrow form on some pages, wrap it in .stacked-form */
.stacked-form form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px; /* vertical spacing between groups */
    margin-top: 20px;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

/* Region maintenance uses grid-based layout: keep block flow */
.form-grid form {
    display: block;
    width: auto;
    margin-top: 20px;
}

/* Slightly widen gutters inside the top-level row if needed */
.form-grid .row.gx-4 {
    --bs-gutter-x: 2rem;
}

.form-grid .row.gy-3 {
    --bs-gutter-y: 1rem;
}

/* Permission Denied Styles */
.permission-denied-container {
    text-align: center;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    max-width: 400px;
    background-color: #f9f9f9;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.permission-denied-title {
    color: red;
    font-size: 24px;
    margin-bottom: 15px;
}

.permission-denied-message {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

/* Return Button */
.return-btn {
    font-size: 16px;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 15px;
    transition: background-color 0.3s ease;
}

    .return-btn:hover {
        background-color: #0056b3;
    }

/* Header Styles */
.main-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: white;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    position: sticky;
    top: 0;
    gap: 20px;
}

.menu-header {
    margin-left: auto;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    max-height: 50px;
    margin-right: 15px;
}

.app-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

/* Form Groups (play nice with Bootstrap) */
form .form-group {
    margin-bottom: 12px;
}

form label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    text-align: left;
}

form input, form textarea, form select {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
}

form textarea {
    resize: vertical;
}

/* Checkbox */
input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Form Buttons */
form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-start;
}

form button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

button#btnSubmit, button#btnUpdate {
    background-color: #28a745;
    color: white;
}

    button#btnSubmit:hover, button#btnUpdate:hover {
        background-color: #218838;
    }

button#btnCancel {
    background-color: #dc3545;
    color: white;
}

    button#btnCancel:hover {
        background-color: #c82333;
    }

/* Title */
h2.text-center {
    margin: 20px 0;
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

/* Warning Message */
.warning-message {
    margin: 20px auto;
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
    max-width: 80%;
    text-align: center;
}
