/******************default*******************/
*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    font-family: "Open Sans", sans-serif;
    -webkit-text-size-adjust: 100%;
}

body {}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

/* ############# Properties ##############*/
.w-75 {
    width: 75%;
}
.w-50 {
    width: 50%;
}
.w-25 {
    width: 25%;
}
.h-100 {
    height: 100%;
}
.h-75 {
    height: 75%;
}
.h-50 {
    height: 50%;
}
.h-25 {
    height: 25%;
}


/* ===== Grid-1 ===== */
.grid-1.offset-0 { grid-column: 1 / span 1; }
.grid-1.offset-1 { grid-column: 2 / span 1; }
.grid-1.offset-2 { grid-column: 3 / span 1; }
.grid-1.offset-3 { grid-column: 4 / span 1; }
.grid-1.offset-4 { grid-column: 5 / span 1; }
.grid-1.offset-5 { grid-column: 6 / span 1; }
.grid-1.offset-6 { grid-column: 7 / span 1; }
.grid-1.offset-7 { grid-column: 8 / span 1; }
.grid-1.offset-8 { grid-column: 9 / span 1; }
.grid-1.offset-9 { grid-column: 10 / span 1; }
.grid-1.offset-10 { grid-column: 11 / span 1; }
.grid-1.offset-11 { grid-column: 12 / span 1; }

/* ===== Grid-2 ===== */
.grid-2.offset-0 { grid-column: 1 / span 2; }
.grid-2.offset-1 { grid-column: 2 / span 2; }
.grid-2.offset-2 { grid-column: 3 / span 2; }
.grid-2.offset-3 { grid-column: 4 / span 2; }
.grid-2.offset-4 { grid-column: 5 / span 2; }
.grid-2.offset-5 { grid-column: 6 / span 2; }
.grid-2.offset-6 { grid-column: 7 / span 2; }
.grid-2.offset-7 { grid-column: 8 / span 2; }
.grid-2.offset-8 { grid-column: 9 / span 2; }
.grid-2.offset-9 { grid-column: 10 / span 2; }
.grid-2.offset-10 { grid-column: 11 / span 2; }

/* ===== Grid-3 ===== */
.grid-3.offset-0 { grid-column: 1 / span 3; }
.grid-3.offset-1 { grid-column: 2 / span 3; }
.grid-3.offset-2 { grid-column: 3 / span 3; }
.grid-3.offset-3 { grid-column: 4 / span 3; }
.grid-3.offset-4 { grid-column: 5 / span 3; }
.grid-3.offset-5 { grid-column: 6 / span 3; }
.grid-3.offset-6 { grid-column: 7 / span 3; }
.grid-3.offset-7 { grid-column: 8 / span 3; }
.grid-3.offset-8 { grid-column: 9 / span 3; }
.grid-3.offset-9 { grid-column: 10 / span 3; }

/* ===== Grid-4 ===== */
.grid-4.offset-0 { grid-column: 1 / span 4; }
.grid-4.offset-1 { grid-column: 2 / span 4; }
.grid-4.offset-2 { grid-column: 3 / span 4; }
.grid-4.offset-3 { grid-column: 4 / span 4; }
.grid-4.offset-4 { grid-column: 5 / span 4; }
.grid-4.offset-5 { grid-column: 6 / span 4; }
.grid-4.offset-6 { grid-column: 7 / span 4; }
.grid-4.offset-7 { grid-column: 8 / span 4; }
.grid-4.offset-8 { grid-column: 9 / span 4; }

/* ===== Grid-5 ===== */
.grid-5.offset-0 { grid-column: 1 / span 5; }
.grid-5.offset-1 { grid-column: 2 / span 5; }
.grid-5.offset-2 { grid-column: 3 / span 5; }
.grid-5.offset-3 { grid-column: 4 / span 5; }
.grid-5.offset-4 { grid-column: 5 / span 5; }
.grid-5.offset-5 { grid-column: 6 / span 5; }
.grid-5.offset-6 { grid-column: 7 / span 5; }

/* ===== Grid-6 ===== */
.grid-6.offset-0 { grid-column: 1 / span 6; }
.grid-6.offset-1 { grid-column: 2 / span 6; }
.grid-6.offset-2 { grid-column: 3 / span 6; }
.grid-6.offset-3 { grid-column: 4 / span 6; }
.grid-6.offset-4 { grid-column: 5 / span 6; }
.grid-6.offset-5 { grid-column: 6 / span 6; }

/* ===== Grid-7 ===== */
.grid-7.offset-0 { grid-column: 1 / span 7; }
.grid-7.offset-1 { grid-column: 2 / span 7; }
.grid-7.offset-2 { grid-column: 3 / span 7; }
.grid-7.offset-3 { grid-column: 4 / span 7; }
.grid-7.offset-4 { grid-column: 5 / span 7; }

/* ===== Grid-8 ===== */
.grid-8.offset-0 { grid-column: 1 / span 8; }
.grid-8.offset-1 { grid-column: 2 / span 8; }
.grid-8.offset-2 { grid-column: 3 / span 8; }
.grid-8.offset-3 { grid-column: 4 / span 8; }

/* ===== Grid-9 ===== */
.grid-9.offset-0 { grid-column: 1 / span 9; }
.grid-9.offset-1 { grid-column: 2 / span 9; }
.grid-9.offset-2 { grid-column: 3 / span 9; }

/* ===== Grid-10 ===== */
.grid-10.offset-0 { grid-column: 1 / span 10; }
.grid-10.offset-1 { grid-column: 2 / span 10; }

/* ===== Grid-11 ===== */
.grid-11.offset-0 { grid-column: 1 / span 11; }

/* ===== Grid-12 ===== */
.grid-12.offset-0 { grid-column: 1 / span 12; }


/* ################ Display ############### */
/* Base utilities */
.d-none       { display: none !important; }
.d-block      { display: block !important; }
.d-inline     { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex       { display: flex !important; }

/* ################Controls################ */
.checkbox-label {
    white-space: nowrap;  /* Prevents label from wrapping */
    cursor: pointer;
    font-size: 15px;
    flex: 1;                 /* Allows label to take remaining space */
    line-height: 1.2;
}

/******************Layouts*******************/
#title-container {
    height: 600px;
    padding: 10px 20px;
}

.ddns-docs {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 80%;
    max-width: 900px;
    margin: 20px auto;
    padding: 10px 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.ddns-docs ol {
    padding-left: 20px;
}

.ddns-docs ol li {
    margin-bottom: 15px;
}

.ddns-docs ol ol {
    margin-top: 10px;
    padding-left: 30px;
}

.ddns-docs ol ol li {
    margin-bottom: 5px;
}

.ddns-docs table {
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
}

.ddns-docs th,
.ddns-docs td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.slogan {
    width: 500px;
    max-width: 500px;
}

.slogan h1 {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 20px;
    text-align: center;
}

.slogan h4 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.login-div,
.signup-div,
.reset-div {
    width: 350px;
    height: 300px;
    max-width: 500px;
    max-height: 300px;
    margin: 0 auto;
    padding: 10px 20px;
}

.reset-div {
    height: 250px;
}

.pass-signup {
    margin: 0 auto;
}

.code {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    overflow-x: auto;
    width: 90%;
}
/* ###################### HEADER ###################### */
.header {
    padding: 10px 20px;
    border-bottom: 1px solid #d5d5d5;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Logo styling */
.logo {
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    color: #007bff;
}

.logo:hover {
    color: #0056b3;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100vh;
    background-color: rgb(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li {
    width: 100%;
}

.sidebar a {
    width: 100%;
}

.menu-button {
    display: none;
}


/* Tab Styling */
.tab {
    color: black;
    text-decoration: none;
    padding: 10px 20px;
    position: relative;
    /* Required for pseudo-elements */
    transition: box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
}

/* Hover Effect with Shadow */
.tab:hover::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: #007bff;
    border-radius: 2px;
}

/* Optional: Subtle Underline for Active Tab */
.tab.active::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: #007bff;
    border-radius: 2px;
}

/* Dropdown container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown toggle button */
.dropdown-toggle {
    padding: 8px 15px;
    font-size: 1em;
    color: #333;
    background-color: transparent;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dropdown-toggle:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* Dropdown menu */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 150px;
    margin-top: 5px;
    overflow: hidden;
    /* To handle rounded corners */
}

/* Show dropdown menu */
.dropdown-menu.show {
    display: block;
}

/* Dropdown menu item */
.dropdown-item {
    display: block;
    padding: 10px 15px;
    font-size: 0.95em;
    color: #333;
    background-color: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Specific styling for logout button */
.logout-btn {
    color: #dc3545;
}

.logout-btn:hover {
    background-color: #f8d7da;
    color: #a71d2a;
}

/* Arrow styling */
.dropdown-arrow {
    font-size: 0.8em;
    color: #555;
    transition: transform 0.3s ease;
}

/* Rotate arrow when dropdown is active */
.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}


/* ###################### MAIN ###################### */
.hostnames-container {
    display: flex;
    flex-direction: column;
    width: 75%;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}

/* Header styling */
.hostnames-container h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.zone {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fefefe;
    border-radius: 5px;
    margin: 20px 0;
    color: #525050;
    gap: 10px;
}

.record {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 10px 10px;
    box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.1);
}

.record-header {
    display: none;
    width: 100%;
    font-size: .9rem;
    font-weight: 200;
    box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.1);
}

.dns-record {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

/* Button styles */
.btn {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 2px;
}

.icon-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.modify-btn {
    background-color: #5cb85c;
    color: white;
    border: none;
    transition: background-color 0.3s;
}

.modify-btn:hover {
    background-color: #4cae4c;
}

/* Delete button */
.delete-btn {
    background-color: #d9534f;
    color: white;
    border: none;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #c9302c;
}

.login-btn,
.signup-btn,
.reset-btn,
.nav-btn {
    background-color: #007bff;
    /* Primary blue */
    color: white;
    font-size: 16px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-btn:hover {
    background-color: #0056b3;
    /* Darker blue */
}

.login-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.nav-btn {
    width: 150px;
    height: 30px;
    border-radius: 15px;
    font-weight: 600;
}
/* ###################### Input Fields ###################### */
#create-hostname-form input {
    width: 100%;
    max-width: 500px;
    /* Adjust width as needed */
    padding: 8px 12px;
    margin: 0 auto;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#create-hostname-form input:focus {
    border-color: #007bff;
    /* Highlight color */
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
}

#create-hostname-form input::placeholder {
    color: #aaa;
    font-style: italic;
}

#create-hostname-form input:disabled {
    background-color: #f2f2f2;
    cursor: not-allowed;
}

.input-error-field {
    display: flex;
    flex-direction: column;
}

.field-error {
    color: red;
    font-size: 0.6em;
}

/* ###################### DIALOG ###################### */
/* Modal backdrop */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* semi-transparent black */
    z-index: 9999;

    /* Hidden by default */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show modal when .fade.in is added */
.modal.fade {
    visibility: visible;
    opacity: 1;
}

/* Modal dialog box */
.modal-dialog {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    /* Hidden by default */
    transition: transform 0.3s ease;
}

/* Dialog grows slightly when modal is shown */
.modal.fade .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 1rem 0;
    max-height: 60vh;
    overflow-y: auto;
}

/* Optional form field styles */
.field-div {
    margin-bottom: 1rem;
    margin-top: 1rem;
    gap: 20px;
}

.field-div label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.field-div input,
.field-div select,
.field-div textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.modal-footer {
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Buttons inside the footer */
.modal-footer button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.modal-footer button[type="button"] {
    background-color: #e0e0e0;
    color: #333;
}

.modal-footer button[type="submit"] {
    background-color: #5cb85c;
    color: white;
}

.modal-footer button:hover {
    opacity: 0.9;
}

/* ###################### FOOTER ###################### */
.footer {
    padding: 10px 20px;
    border-top: 1px solid #d5d5d5;
    background-color: #f8f9fa;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.left-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: 80%;
}

.right-container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 10px;
    width: 20%;
}
/* ###################### RESPONSIVE ###################### */
/* Responsive design */
@media (min-width: 576px) {
    .sm-none  { display: none !important; }
    .sm-block { display: block !important; }
    .sm-flex  { display: flex !important; }
}

@media (min-width: 768px) {
    .md-none  { display: none !important; }
    .md-block { display: block !important; }
    .md-flex  { display: flex !important; }
    .md-grid  {
        display: grid !important;
        grid-template-columns: repeat(12, 1fr) !important;
    }

    .record , .record-header{
        display: flex;
        flex-direction: row;
        padding: 0px;
    }

    .dns-record{
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        padding: 10px;
        width: 100%;
    }
}

@media (min-width: 992px) {
    .lg-none  { display: none !important; }
    .lg-block { display: block !important; }
    .lg-flex  { display: flex !important; }
}

@media (min-width: 1200px) {
    .xl-none  { display: none !important; }
    .xl-block { display: block !important; }
    .xl-flex  { display: flex !important; }
}

@media (max-width: 800px) {

    .menu-button {
        display: block;
    }

    .hostnames-container h1 {
        font-size: 1.5rem;
    }

    .hostnames-table {
        font-size: 0.9rem;
    }

    .btn {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .sidebar {
        width: 100%;
    }
}