/*global properties*/
@font-face {
    font-family: 'header'; /* Choose a name for your font */
    src: url('/static/fonts/AlfaSlabOne-Regular.ttf') format('truetype');
    /* --- Recommended: Add other formats if available for better browser support --- */
    /* src: url('/static/fonts/AlfaSlabOne-Regular.woff2') format('woff2'),
           url('/static/fonts/AlfaSlabOne-Regular.woff') format('woff'),
           url('/static/fonts/AlfaSlabOne-Regular.ttf') format('truetype'); */
    font-style: normal;
  }

@font-face {
    font-family: 'subheader'; /* Choose a name for your font */
    src: url('/static/fonts/Lato-BoldItalic.ttf') format('truetype');
    font-style: normal;
    }

@font-face {
    font-family: 'body'; /* Choose a name for your font */
    src: url('/static/fonts/Lato-BoldItalic.ttf') format('truetype');
    font-style: normal;
    }

/*    COMPONENTS    */
.header {
    font-family: 'header';
    font-size: 1.85rem; /* Roughly similar to an h3 heading */
    font-weight: 400;   /* Common value for bold */
    /* Alternatives: bold, 600 (semi-bold), 400 (normal) */
  
    /* Color: Set a text color if different from the default. */
    color: #212529; /* Bootstrap's default dark text color, adjust if needed */
    margin-bottom: 1rem; /* Adjust spacing as needed (e.g., 0.5rem, 1.5rem) */
    /* Line Height: Can be adjusted for better readability with larger fonts. */
    line-height: 1.2;
    letter-spacing: 0.05rem;
  }

.subheader {
    font-family: 'subheader';
    font-size: 1.75rem; /* Roughly similar to an h3 heading */
    font-weight: 400;   /* Common value for bold */
    /* Alternatives: bold, 600 (semi-bold), 400 (normal) */
  
    /* Color: Set a text color if different from the default. */
    color: #282c30; /* Bootstrap's default dark text color, adjust if needed */
    margin-bottom: 1rem; /* Adjust spacing as needed (e.g., 0.5rem, 1.5rem) */
    /* Line Height: Can be adjusted for better readability with larger fonts. */
    line-height: 1.2;
  }

.data-card-header {
    font-family: 'header';
    font-size: 0.90rem; /* Roughly similar to an h3 heading */
    font-weight: 220;   /* Common value for bold */
    /* Alternatives: bold, 600 (semi-bold), 400 (normal) */
  
    /* Color: Set a text color if different from the default. */
    color: #212529; /* Bootstrap's default dark text color, adjust if needed */
    margin-bottom: 1rem; /* Adjust spacing as needed (e.g., 0.5rem, 1.5rem) */
    /* Line Height: Can be adjusted for better readability with larger fonts. */
    line-height: 1.2;
    letter-spacing: 0.05rem;
  }

.body {
    font-family: 'body';
    font-size: 1.25rem; /* Roughly similar to an h3 heading */
    font-weight: 200;   /* Common value for bold */
    /* Alternatives: bold, 600 (semi-bold), 400 (normal) */
  
    /* Color: Set a text color if different from the default. */
    color: #33373b; /* Bootstrap's default dark text color, adjust if needed */
    margin-bottom: 1rem; /* Adjust spacing as needed (e.g., 0.5rem, 1.5rem) */
    /* Line Height: Can be adjusted for better readability with larger fonts. */
    line-height: 1.2;
  }

/*This affects the whole page*/
body {
    line-height: 1.6;
    padding: 20px;
}
/* Media query: Apply styles only when the viewport width is at least 768px */
@media (min-width: 860px) {
    body {
        margin: 0 60px;
    }
}


/*Tsndard container*/
.custom-container {
    margin-left: auto;
    margin-right: auto;
    width: 100%;  
    /* Optional: You might want to add some padding so content isn't flush against the border */
    /* padding: 1rem; */
  }

/* Code to modify share popup Overlay styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
  }
  
  .overlay-content {
    background: white;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 5px;
  }
  .btn-download {
    /* Match your existing button styles */
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    /* Add your preferred colors and other styles */
}

/*NAVBAR */
/* Optional: Adjust logo size */
.navbar-brand.logo img {
    height: 30px; /* Adjust as needed */
}

/* Optional: Style the active link */
.navbar-nav .nav-link {
    font-family: 'header', serif;
}

.dropdown-item {
    font-family: 'header', serif;
}
/* Optional: Customize hover effect */
.navbar-nav .nav-link:hover {
    color: #00ffb3; /* Example hover color */
}

/*this is for the image container in the template construction page*/
.editor-main-container {
    display: flex;
    flex-direction: column;
    max-width: 1000px; /* Adjust as needed */
    margin: 2rem auto;
    background-color: #ffffff;
    border-radius: 12px; /* Softer rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* More pronounced shadow */
    overflow: hidden; /* Ensures child elements respect rounded corners */
}

.editor-header {
    background-color: #f8f9fa; /* Slightly off-white for header */
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-header .filename {
    font-weight: 400;
    color: #495057;
    font-family: "header";
}

.editor-header .actions button {
    margin-left: 0.5rem;
    border-radius: 6px; /* Consistent rounded buttons */
}

.editor-body {
    display: flex;
    flex-grow: 1;
}

.preview-panel {
    flex-grow: 3; /* Takes more space */
    padding: 1.5rem;
    background-color: #e9ecef; /* Slightly darker background for the image container */
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #dee2e6; /* Separator line */
}

.preview-panel .image-canvas {
    position: relative;
    background-color: #ffffff; /* White canvas for the image */
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    max-height: 500px; /* Or adjust as needed */
    overflow: auto; /* For very large images */
}

.preview-panel .image-canvas img {
    display: block;
    max-width: 100%;
    max-height: 450px; /* Constraint within canvas */
    border-radius: 4px; /* Slight rounding for the image itself */
}

.controls-panel {
    flex-grow: 1; /* Takes less space */
    padding: 1.5rem;
    background-color: #ffffff;
    overflow-y: auto; /* Scroll for many controls */
    min-width: 300px; /* Minimum width for the controls */
}

.controls-panel .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057; /* Dark grey for labels */
    margin-bottom: 0.3rem; /* Tighter spacing */
}

.controls-panel .form-select,
.controls-panel .form-control { /* Added .form-control for general inputs if any */
    border-radius: 6px; /* Consistent rounded inputs */
    border: 1px solid #ced4da;
    font-size: 0.9rem;
    background-color: #f8f9fa; /* Light background for inputs */
}
.controls-panel .form-select:focus,
.controls-panel .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}


.controls-panel .mb-3 { /* Adjusted margin for better spacing in a dense UI */
     margin-bottom: 1rem !important;
}
 .controls-panel .mb-1 { /* Adjusted margin for better spacing in a dense UI */
     margin-bottom: 0.75rem !important;
}


.checkbox-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}
.checkbox-group {
    background-color: #f8f9fa; /* Light bg for checkbox area */
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.checkbox-options .form-check { /* Style individual checkbox containers */
    margin-bottom: 0.5rem;
}
.checkbox-options .form-check-input {
    border-color: #adb5bd;
}
.checkbox-options .form-check-input:checked {
    background-color: #0d6efd; /* Bootstrap primary */
    border-color: #0d6efd;
}
.checkbox-options .form-check-label {
    font-size: 0.85rem;
    color: #343a40;
}


.panel-section { /* For grouping controls */
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #fdfdfd; /* Slightly off-white sections */
    border: 1px solid #e9ecef;
    border-radius: 8px;
}
.panel-section-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}


.editor-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 0.75rem; /* Space between buttons */
}

.editor-footer .btn {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Consistent font */
    font-weight: 500;
    padding: 0.5rem 1rem; /* Standard padding */
    border-radius: 6px;
}

.btn-primary.btn-share { /* Customizing your share button */
    background-color: #007bff; /* Primary blue */
    border-color: #007bff;
}
.btn-primary.btn-share:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-outline-secondary.btn-home { /* Customizing your home button */
    color: #6c757d;
    border-color: #6c757d;
}
 .btn-outline-secondary.btn-home:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) { /* Adjust breakpoint as needed (e.g., 768px is a common one for tablets and below) */
    .editor-body {
        flex-direction: column; /* Stack the panels vertically */
    }

    .preview-panel {
        border-right: none; /* Remove the right border */
        border-bottom: 1px solid #dee2e6; /* Add a bottom border as a separator */
        max-height: 450px; /* Optional: constrain image preview height on mobile */
    }

    .preview-panel .image-canvas {
         max-height: 400px; /* Adjust if preview-panel max-height is set */
    }

    .controls-panel {
        min-width: unset; /* Remove fixed min-width on mobile */
        border-top: 1px solid #e9ecef; /* Optional: Add a top border for separation if preview panel doesn't have bottom */
    }

    .editor-main-container {
        margin: 1rem; /* Reduce margin on smaller screens */
    }

    .editor-footer {
        flex-direction: column; /* Stack buttons in footer */
        align-items: stretch; /* Make buttons full width in stacked footer */
    }

    .editor-footer .btn {
        width: 100%; /* Make buttons take full width */
        margin-bottom: 0.5rem; /* Add some space between stacked buttons */
    }
     .editor-footer .btn:last-child {
        margin-bottom: 0;
    }
}

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7); /* Optional: semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Ensure it's above the image */
  }