@import url('https://fonts.googleapis.com/css2?family=Darumadrop+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --background-color: #FFFBF7;
  --primary-color: #E06150;
  --primary-hover-color: #C05448;
  --secondary-color: #C05448;
  --text-dark: #120008;
}

/* Main application styles — contributors should edit this under src/static/css */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background-color: var(--background-color);
}

.card {
  padding: 2rem;
  background: none;
  --bs-card-border-color: none;
}

/* === Navbar === */
.navbar {
    padding: 0;
}

.navbar .container-fluid{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #E06150;
    min-height: 4rem;
    padding: 0 3rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-family: "Darumadrop One", sans-serif;
    font-size: 3rem;
    font-weight: 400;
}

.navbar-brand, .nav-link {
   color: #FFF7FD;
}

.nav-link{
    font-size: 1rem;
}

.navbar-nav{
    font-family: "Inter", sans-serif;
    font-weight: 700;
}

.custom-navbar .nav-link:hover, 
.custom-navbar .nav-link:focus,
.custom-navbar .navbar-brand:hover,
.custom-navbar .navbar-brand:focus {
  color: #FFF7FD;
}

/* === Package list header buttons === */
.btn {
    transition: transform 1s ease-in-out;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;    
    font-weight: 700;
}

.btn-primary {
    border-radius: 16px;
    margin-right: 0.75rem;
    min-width: 12rem;
}

.pkg-lst .btn-secondary {
    border-radius: 12px;
    min-width: 4rem;
    padding: 0;
}

.btn-primary:hover, .btn-secondary:hover{
    background-color: var(--primary-hover-color);
    border-color: #C05448;
}

.btn-primary:active, .btn-secondary:active {
    --bs-btn-active-bg: var(--secondary-color);
    --bs-btn-active-border-color: var(--secondary-color);
}

.icon-large {
    font-size: 1.5rem;
}

/* === Search bar === */
.search-container {
    position: relative;
}

.search-container .form-control {
    border: 1px solid var(--text-dark);
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 3rem;
    font-family: "Inter", sans-serif;
    background-color: var(--background-color);

}

.search-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 1.1rem;
}

/* === Paginator === */
.page-item.disabled {
    --bs-pagination-disabled-bg: transparent;
}

.page-link {
    border: none;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    --bs-pagination-active-color: var(--text-dark);
    --bs-pagination-active-bg: transparent;
    --bs-pagination-active-border-color: transparent;
}

.page-link.active {
    font-weight: 700;
}

.page-link:active {
    outline: none;
    box-shadow: none;
    background-color: transparent;
}

.page-link:focus {
    background-color: transparent;
}

.page-link:hover {
    color: var(--text-dark);
}

/* === Table === */
.custom-table.card {
    --bs-card-border-color: none;
    padding: 1rem 0;
}

.table.table-hover {
    font-family: "Inter", sans-serif;
    --bs-table-border-color: var(--background-color);
}

.table.table-hover th {
    font-weight: 700;
    color: var(--primary-color);
}

.table.table-hover td {
    color: #120008;
    vertical-align: middle;
}

.table.table-hover a {
    font-weight: 700;
    color: #FB9D96;
    text-decoration: none;
}

.table-button {
    background-color: transparent;
    border: none;
}

.bi.bi-chevron-down {
    color: var(--primary-color);
}

.bi.bi-link-45deg {
    font-size: 2rem;
}

.bi.bi-pin-angle {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.pin-button {
    position: relative;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.2s ease;
}

.pin-button.pinned {
    border-color: var(--primary-color);
}

.pin-button.pinned .bi-pin-angle {
    color: var(--primary-color);
}

.bi.bi-trash3 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.table > :not(caption) > * > * {
  background-color: var(--background-color);
}

/* Modal */
.custom-input {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border-width: 1px;
    color: #929292;
}

#newPackageModal {
    --bs-modal-header-border-width: 0;
    --bs-modal-footer-border-width: 0;
    font-family: "Inter", sans-serif;
}

#newPackageModal .btn-close {
    --bs-btn-close-bg: none;
}

#newPackageModal .modal-header {
    padding-bottom: 0;
}

#newPackageModal .modal-title {
    font-family: "Darumadrop One", Times, serif;
    font-size: 38px;
    font-weight: 400;
    color: #591A0E
}

#newPackageModal .modal-content {
    background-color: #FFFBF7; 
    padding: 2rem;
}

/* === Login Page === */
body:has(.login-page) .custom-navbar {
    display: none;
}

body:has(.login-page) .card {
    padding: 0;
    background: none;
}

.login-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    height: 100vh;
    padding: 4rem 2rem 0 2rem;
    box-sizing: border-box;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: auto;
    width: 100%;
}

.login-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
}

.login-title {
    font-family: "Darumadrop One", sans-serif;
    font-size: 6rem;
    font-weight: 400;
    color: #591A0E;
    text-align: left;
    margin: 0;
}

.login-button-image {
    display: block;
    border: none;
    cursor: pointer;
    max-width: 350px;
    height: auto;
}

.login-button-image:hover {
    opacity: 0.9;
}

/* === Home Dashboard === */
body:has(.home-dashboard) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body:has(.home-dashboard) .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.home-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 4rem);
    padding: 2rem;
    padding-bottom: 0;
}

.dashboard-card {
    background-color: white;
    border: 2px solid #87CEEB;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 0;
    flex: 1;
}

.dashboard-card .table > :not(caption) > * > * {
    background-color: white;
}

.dashboard-card .table.table-hover tbody tr:hover > * {
    background-color: white;
}

.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: "Darumadrop One", sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #591A0E;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.dashboard-footer {
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

.dashboard-footer .grass-image {
    width: 100%;
    height: auto;
    display: block;
}

.login-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: auto;
}

.pigs-image {
    position: relative;
    z-index: 2;
    width: auto;
    height: auto;
    max-width: 60vw;
    min-width: 400px;
    display: block;
}

.grass-image {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: auto;
    min-width: 100%;
    z-index: 1;
    object-fit: cover;
    object-position: bottom;
    display: block;
}

@media (max-width: 768px) {
    .login-title-wrapper {
        gap: 1.5rem;
    }
    
    .login-title {
        font-size: 4rem;
    }
    
    .login-button {
        padding: 1.25rem 3rem;
        font-size: 1.25rem;
    }
    
    .pigs-image {
        max-width: 80vw;
    }
}