/* Milligram overrides */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    background: #f5f6f5; /* Updated from #f5f7fa for a slightly warmer tone */
    color: #333; /* Added for readability */
}

.top-nav-links,
.side-nav,
h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", sans-serif; /* Switched to Roboto for professionalism */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    color: #363637;
}

a {
    color: #2f85ae;
    -webkit-transition: all 0.2s linear;
    transition: all 0.2s linear;
}

a:hover,
a:focus,
a:active {
    color: #2a6496;
    -webkit-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
}

/* In webroot/css/cake.css */
textarea.form-control.full-desc-textarea {
    font-size: 2rem;
    height: 300px !important;
    width: 100%;
    resize: vertical;
    box-sizing: border-box;
}

.side-nav a,
.top-nav-links a,
th a,
.actions a {
    color: #606c76;
}

.side-nav a:hover,
.side-nav a:focus,
.actions a:hover,
.actions a:focus {
    color: #2f85ae;
}

/* Utility */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Main */
.content {
    padding: 2rem;
    background: #ffffff;
    border-radius: 0.4rem;
    box-shadow: 0 7px 14px 0 rgba(60, 66, 87, 0.1),
        0 3px 6px 0 rgba(0, 0, 0, 0.07);
}
.actions a {
    font-weight: bold;
    padding: 0 0.4rem;
}
th {
    white-space: nowrap;
}

/* Nav bar */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 112rem;
    padding: 2rem;
    margin: 0 auto 2rem;
}
.top-nav-title a {
    font-size: 2.4rem;
    color: #d33c43;
}
.top-nav-title span {
    color: #404041;
}
.top-nav-links a {
    margin: 0 0.5rem;
}
.top-nav-title a,
.top-nav-links a {
    font-weight: bold;
}

/* New navbar styles for Bootstrap */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a3c6d; /* Navy blue for professionalism */
}
.nav-link {
    color: #495057;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color 0.2s ease-in-out;
}
.nav-link:hover {
    color: #1a3c6d;
}
.nav-link.active {
    color: #1a3c6d !important;
    font-weight: 600;
    background-color: rgba(26, 60, 109, 0.1);
    border-radius: 0.375rem;
}
.dropdown-item.active {
    background-color: #1a3c6d;
    color: #ffffff;
}
.dropdown-item:hover {
    background-color: rgba(26, 60, 109, 0.1);
    color: #1a3c6d;
}

/* Main content area */
.main {
    padding: 2rem 0;
}
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.card-body {
    padding: 2rem;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    margin-bottom: 0;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}
.breadcrumb-item a {
    color: #1a3c6d;
    text-decoration: none;
}
.breadcrumb-item a:hover {
    color: #15315a;
    text-decoration: underline;
}
.breadcrumb-item.active {
    color: #6c757d;
}

/* Footer */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 1rem 0;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary {
    background-color: #1a3c6d;
    border-color: #1a3c6d;
}
.btn-primary:hover {
    background-color: #15315a;
    border-color: #15315a;
}

.side-nav-item {
    display: block;
    padding: 0.5rem 0;
}

/* View action */
.view.content .text {
    margin-top: 1.2rem;
}
.related {
    margin-top: 2rem;
}

/* Flash messages */
.message {
    padding: 1rem;
    background: #eff8ff;
    color: #2779bd;
    border-color: #6cb2eb;
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    margin-bottom: 2rem;
    display: block;
    width: 100%;
}
.message.hidden {
    display: none;
}
.message.success {
    background: #e3fcec;
    color: #1f9d55;
    border-color: #51d88a;
}
.message.error {
    background: #fcebea;
    color: #cc1f1a;
    border-color: #ef5753;
}
.message.info {
    background: #eff8ff;
    color: #2779bd;
    border-color: #6cb2eb;
}

/* Forms */
.input.radio,
.input.checkbox {
    margin-bottom: 2.0rem;
}
.input.radio input,
.input.checkbox input {
    margin: 0;
}
.input.radio label,
.input.checkbox label {
    margin: 0;
    display: flex;
    align-items: center;
}
.input.radio label > input,
.input.checkbox label > input {
    margin-right: 1.0rem;
}
.input.radio label:first-of-type {
    margin-bottom: 2.0rem;
}

/* Paginator */
.paginator {
    text-align: right;
}
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.pagination li {
    margin: 0 0.5rem;
}
.prev.disabled a,
.next.disabled a {
    cursor: not-allowed;
    color: #606c76;
}
.asc:after {
    content: " \2193";
}
.desc:after {
    content: " \2191";
}

.send-form .form-control,
.send-form .form-select,
.send-form textarea,
.send-form input {
    font-size: 1.5rem;   /* Bigger text */
    padding: 0.75rem;    /* More space inside fields */
}

.dropdown-item {
    font-size: 1.3rem;   /* Bigger text */
    padding: 0.75rem;    /* More space inside fields */
}

/* Error */
.error-container {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
}

@media screen and (max-width: 640px) {
    .top-nav {
        margin: 0 auto;
    }
    .side-nav {
        margin-bottom: 1rem;
    }
    .heading {
        margin-bottom: 1rem;
    }
    .side-nav-item {
        display: inline;
        margin: 0 1.5rem 0 0;
    }
    .asc:after {
        content: " \2192";
    }
    .desc:after {
        content: " \2190";
    }
}
/* Tables */
.table {
    color: #495057;
}
.table th {
    background-color: #f8f9fa;
    color: #1a3c6d;
}
.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}

/* Forms */
.form-label {
    color: #1a3c6d;
    font-weight: 500;
}
.form-control {
    font-size: 1.2rem;   /* Bigger text */
    padding: 0.75rem;    /* More space inside fields */
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn-outline-primary {
    color: #1a3c6d;
    border-color: #1a3c6d;
}
.btn-outline-primary:hover {
    background-color: #1a3c6d;
    color: #ffffff;
}
.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}
.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #ffffff;
}
/* 3D Button Styles */
.btn-3d-primary {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #d1dbe8; /* Lightened text color */
    background: linear-gradient(to bottom, #1a3c6d, #15315a);
    border: 1px solid #1a3c6d;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    text-align: center;
}

.btn-3d-primary:hover {
    background: linear-gradient(to bottom, #15315a, #102645);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    color: #d1dbe8; /* Maintain lightened text on hover */
    text-decoration: none;
}

.btn-3d-secondary {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #495057;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef); /* Light gradient */
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    text-align: center;
}

.btn-3d-secondary:hover {
    background: linear-gradient(to bottom, #e9ecef, #dee2e6);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    color: #495057;
    text-decoration: none;
}

.btn-3d-danger {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(to bottom, #dc3545, #c82333);
    border: 1px solid #dc3545;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    text-align: center;
}

.btn-3d-danger:hover {
    background: linear-gradient(to bottom, #c82333, #bd2130);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    color: #ffffff;
    text-decoration: none;
}
/* Action Buttons in Table */
.action-buttons .btn {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 0.5rem;
/* }   padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 4px; */
    transition: all 0.2s ease;
}

.btn-action-view {
    color: #495057; /* Dark gray */
    background-color: #e9ecef; /* Light gray fill */
    border: 1px solid #ced4da;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-action-view:hover {
    background-color: #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    color: #495057;
}

.btn-action-edit {
    color: #ffffff;
    background-color: #1a3c6d; /* Navy blue fill */
    border: 1px solid #1a3c6d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-action-edit:hover {
    background-color: #15315a;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-action-delete {
    color: #dc3545; /* Red */
    background-color: #f8d7da; /* Light red fill */
    border: 1px solid #dc3545;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-action-delete:hover {
    background-color: #f5c6cb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    color: #dc3545;
}

.btn-sm {
    padding: 0.5rem 1rem; /* Adjust padding for smaller buttons */
    font-size: 0.9rem;  /* Adjust font size */
}

.copy-btn {
    font-family: inherit;            /* Ensure it matches surrounding buttons */
    font-size: 0.8125rem;            /* Bootstrap v5 actual .btn-sm font-size */
    padding: 0.25rem 0.5rem;         /* Matches .btn-sm */
    line-height: 1.5;
    border-radius: 0.2rem;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
    user-select: none;
    background-color: transparent;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0;
    height: auto;
}

.copy-btn:hover {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0a58ca;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Paragraph Content Styling */
.paragraph-content {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notes-content {
    font-style: italic;
    color: #6c757d;
    line-height: 1.5;
}

/* Toast notifications */
.alert.position-fixed {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 8px;
}

/* Sidebar Layout Fixes */
@media (min-width: 768px) {
    .sidebar-layout {
        display: flex;
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .sidebar-layout .col-lg-3,
    .sidebar-layout .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Modern Color Scheme - Slate & Emerald */
.text-slate-700 { color: #334155 !important; }
.text-slate-800 { color: #1e293b !important; }
.text-slate-500 { color: #64748b !important; }
.text-emerald-600 { color: #059669 !important; }

.bg-slate-50 { background-color: #f8fafc !important; }
.bg-slate-100 { background-color: #f1f5f9 !important; }

.border-slate-200 { border-color: #e2e8f0 !important; }

/* Modern Button Styles */
.btn-modern-primary {
    background: linear-gradient(135deg, #059669, #047857);
    border: 1px solid #059669;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-modern-primary:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    border-color: #047857;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    text-decoration: none;
}

.btn-modern-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    border: 1px solid #64748b;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-modern-secondary:hover {
    background: linear-gradient(135deg, #475569, #334155);
    border-color: #475569;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
    text-decoration: none;
}

.btn-modern-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 1px solid #dc2626;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-modern-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    border-color: #b91c1c;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    text-decoration: none;
}

.btn-modern-outline {
    background: transparent;
    border: 1px solid #059669;
    color: #059669 !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-modern-outline:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
    text-decoration: none;
}

.btn-modern-outline-secondary {
    background: transparent;
    border: 1px solid #64748b;
    color: #64748b !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-modern-outline-secondary:hover {
    background: #64748b;
    border-color: #64748b;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
    text-decoration: none;
}
