html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    width: 100%;
    background-color: #fff;
}

a {
    color: #ff4400;
    transition: color 0.3s ease;
}

a:hover {
    color: #333;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    height: 70px;
    padding: 10px 20px 0;
    border-bottom: 1px solid #999;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    background-color: #e7e7e7;
    z-index: 100;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

div#logo {
    margin: 15px 0;
    display: inline-block;
    float: left;
}

img.logo {
    height: 60px;
}

nav {
    display: inline-flex;
    justify-content: space-between;
    width: 100%;
    float: right;
    padding-top: 1rem;
    max-width: 1006px;
    font-size: 1.1rem;
}

@media (width < 830px) {
    nav {
            max-width: 530px;
        }
}

.menu-icon {
    width: 24px;        /* or whatever size you want */
    height: 24px;
    vertical-align: middle;
    margin-right: 6px;  /* space between icon and text */
    padding-bottom: 4px;
}

nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ccc;
}

.admin-nav {
    display: flex;
    gap: 20px;
    position: relative;
    color: #1f1f1f;
}

.admin-nav ul {
    margin: 0;
    padding: 0;
}

.admin-nav ul li {
    text-decoration: none;
    padding: 2px 0 0;
    display: inline-block;
}

.dropdown {
    position: relative;
}

ul.dropdown-menu {
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    min-width: 160px;
    z-index: 100;
    padding: 15px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dropdown-menu a {
    padding: 8px 0;
    white-space: nowrap;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-toggle {
    cursor: pointer;
    padding: 2px 0 0;
    display: inline-block;
    margin-right: 21px;
}

.nav-single {
    margin-right: 21px;
}

nav li.menu-selected a, .accordion-content a.menu-selected, .accordion-title a.menu-selected {
    color: #ff4400;
    font-weight: bold;
}


/******************* HAMBURGER MENU *******************/

.hamburger-menu {
    display: none;
}

/* Hamburger button */
.menu-button {
    display: flex;
    flex-direction: column;
    position: relative;
    float: right;
    justify-content: space-around;
    width: 50px;
    height: 50px;
    border: none;
    cursor: pointer;
    padding: 12px;
    margin: 6px 0;
    border-radius: 8px;
    z-index: 2000;
    min-width: 0;
    background-color: #ccc;
}

.menu-button span {
    display: block;
    width: 100%;
    height: 2px;   /* bar thickness */
    border-radius: 2px;
    transition: all 0.3s ease;
    background-color: #222;
}

button#menu-button:focus {
    outline: none;
}

/* Animate into cross */
.menu-button.open span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 6px);
}
.menu-button.open span:nth-child(2) {
    opacity: 0;
}
.menu-button.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -5px);
}

.item, .item a {
    width: 100%;
    display: inline-block;
    text-decoration: none;
    padding-top: 12px;
    color: #333;
    transition: color 0.4s ease, text-decoration 0.4s ease;
}

.item, .item a:hover {
    color: #ccc;
}

.accordion-title {
    font-weight: bold;
    padding: 14px 0;
    cursor: pointer;
    color: #333;
}

.accordion-title a {
    color: #333;
    text-decoration: none;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px;
    transition: max-height 0.35s ease;
}

.accordion.open .accordion-content {
    max-height: 500px; /* enough for all items */
}

.accordion-content a {
    padding: 6px 0;
    color: #333;
    text-decoration: none;
}

.accordion-content a:hover {
    color: #ccc;
}


/******************* TOP SLIDING MENU *******************/
.menu-top-slide {
    position: fixed;
    top: 80px;            /* start just below header */
    left: 0;
    width: 100%;
    max-height: 0;        /* collapsed */
    overflow: hidden;
    transition: max-height 0.6s ease;
    z-index: 1500;        /* lower than header */
}

.menu-top-slide ul {
    list-style: none;
    margin: 0;
    background-color: #fff;
    padding: 0 2rem 2rem;
}

.menu-top-slide.open {
    max-height: 820px;
    background-color: #fff;
}

li.accordion {
    border-bottom: 1px solid #00000050;
}

.menu-top-slide a {
    display: block;
    width: 100%;
}

a.nav-lang {
    display: inline;
}

li.accordion.logout {
    border-bottom: 0;
}

/******************* DISPLAY HAMBURGER MENU FOR SMALL SCREENS *******************/

@media (width < 1030px) {
    .admin-nav {
        display: none;
    }

    .logo {
        display: inline;
        margin-right: 0;
    }

    .hamburger-menu {
        position: relative;
        display: inline;
    }
}

h1 {
    font-size: 1.7em;
}

main {
    flex: 1;
    padding: 20px 20px 40px;
}

.content {
    padding: 20px;
}

.rte {
    width: 480px;
    height: 180px;
    padding: 0.5rem;
    border: 1px solid #aaa;
    border-radius: 0.25rem;
    background: #fff;
    font-size: 1rem;
    overflow-y: auto;
    white-space: pre-wrap;
}

@media (width < 700px) {
    .rte {
        width: 95%;
    }
}

/* Toolbar container */
.rte-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

/* Buttons */
.rte-toolbar button {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
    min-width: 50px;
}

/* Hover */
.rte-toolbar button:hover {
    background: #e9e9e9;
    border-color: #bbb;
    color: #333;
}

/* Active press */
.rte-toolbar button:active {
    background: #dcdcdc;
    border-color: #aaa;
    color: #333;
}

/* Bold/italic text inside buttons */
.rte-toolbar button b,
.rte-toolbar button i {
    pointer-events: none;
}

.rte-editor a {
    color: #0077cc;
    text-decoration: underline;
}

.rte ul {
    margin: 0;
    padding-left: 1.2rem;
}

.login {
    text-align: center;
}

.login-form {
    align-items: center;
    padding: 12px;
    background: #eee;
    border-radius: 6px;
    border: 1px solid #ddd;
    width: fit-content;
    margin: 2rem auto;
}

.login-form button {
    display: block;
    margin: 2rem auto;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.oauth-btn {
    text-align: center;
    padding: 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.oauth-icon {
    display: flex;
    align-items: center;
}

.google-white-btn {
    background: #ffffff;
    border: 1px solid #ddd;
}

.google-white-btn:hover {
    color: #ccc;
}

.line-green-btn {
    background: #06C755;
    color: #fff;
    border: 1px solid #ddd;
    transition: background 0.3s ease;
    padding: 0.8rem;
}

.line-green-btn:hover {
    background: linear-gradient(
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1)
    ), #06C755;
    color: #fff;
}

.line-green-btn:active {
    background: linear-gradient(
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.3)
    ), #06C755;
    color: #fff;
}

.oauth-separator {
    text-align: center;
    margin: 1.5rem 0 1rem;
}

.name-restaurant {
    border-bottom: 1px dotted #888;
    padding-bottom: 1rem;
    margin: 1rem 0 1rem;
}

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

label {
    display: block;
    margin-top: 1rem;
}

:where(input, select, textarea, file):not([type=checkbox], [type=radio]) {
    padding: 0.5rem;
    background-size: 1rem auto;
    background-repeat: no-repeat;
    background-color: #fff;
    border: 1px solid #aaa;
    border-radius: 0.25rem;
    font-size: 1rem;
    width: 275px;
}

textarea {
    width: 478px!important;
    height: 164px;
}

@media (width < 700px) {
    textarea {
        width: 95%!important;
    }
}

input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
}

.btn, button {
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    min-width: 150px;
    background-color: green;
}

button {
    display: block;
    margin-top: 1rem;
}

a.btn, button {
    transition: background-color 0.3s ease;
}

a.btn:hover, button:hover {
    color: white;
    background-color: #ccc;
}

.service-box {
    border: 1px solid #ccc;
    padding: 1rem;
    border-radius: 0.25rem;
    background-color: #eee;
    max-width: 500px;
}

.service-box h4 {
    margin-top: 0;
}

/************ SERVICES ************/
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #eee;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.service-edit {
    align-items: center;
    padding: 12px 20px 20px;
    margin-bottom: 3rem;
    background: #eee;
    border-radius: 10px;
    border: 1px solid #ddd;
    width: 100%;
    max-width: 500px;
}

@media (width < 760px) {
    .service-edit {
            width: auto;
    }
}

.service-name {
    font-size: 1.1em;
    font-weight: bold;
}

.service-actions {
    display: flex;
    gap: 8px;
}

.btn-edit {
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    background-color: green;
    line-height: 1;
    transition: background-color 0.3s ease;
}

button.btn-danger {
    background-color: red;
    display: inline;
    margin-top: 0;
    min-width: 0;
    transition: background-color 0.3s ease;
}

.btn-edit:hover, button.btn-danger:hover {
    color: white;
    background-color: #ccc;
}

.sortable {
    min-height: 20px;
}

.sortable-item {
    display: block;
    min-height: 80px;
    margin-bottom: 10px;
    position: relative;
}

.drag-handle {
    cursor: grab;
    font-size: 22px;
    padding: 10px;
    color: #666;
    user-select: none;
    display: flex;
    align-items: center;
}

.drag-handle:active {
    cursor: grabbing;
}

.concept-item, .concept-item2 {
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #eee;
    border-radius: 6px;
    border: 1px solid #ddd;
    grid-template-columns: 40px 100px 1fr 1fr 1fr auto;
    gap: 10px;
    height: 100px;
}

.concept-item2 {
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
}

.concept-item img, .concept-item2 img {
    max-width: 100px;
    max-height: 100px;
    height: auto;
    border-radius: 6px;
    display: block;
}

.concept-item h3, .concept-item2 h3 {
    margin: 0;
}

@media (max-width: 600px) {
    .concept-item.grid {
        grid-template-columns: 40px 1fr 1fr auto;
    }
    .concept-item2.grid {
        grid-template-columns: 1fr 1fr auto;
    }
    .sortable-photo, .sortable-description {
        display: none;
    }
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #ffe5e5;
    color: #b30000;
    border: 1px solid #ffb3b3;
}

.alert-success {
    background: #e6ffe6;
    color: #006600;
    border: 1px solid #99ff99;
}

.strength-meter {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin-top: 6px;
    margin-bottom: 4px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    font-size: 13px;
    margin-top: 2px;
    color: #555;
}

.help ul {
    padding-left: 1.2rem;
    margin: 0;
}

img.understand-website {
    max-width: 340px;
}

footer {
    background-color: #222;
    color: #ccc;
    padding: 1.5rem 20px;
}

footer a:hover {
    color: #fff;
}

.grid-sns {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    padding-top: 1rem;
}

.footer-link {
    text-align: center
}
