/* CSS styles for layout and appearance for New Beginner calculator */
/* General Styles */
      body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5e1c1;
}


    /* Title Section */
        .site-title {
            font-size: 3em;
            font-weight: bold;
            color: black;
            background-color: #1E82E6;
            text-shadow: -2px -2px 0 tan, 2px 2px 8px rgba(0, 0, 0, 0.7);
            padding: 20px;
            margin: 0;
            width: 100%;
            box-sizing: border-box;
        }

        /* Mobile Title Styles */
        @media screen and (max-width: 768px) {
            .site-title {
                font-size: 2em;
                padding: 15px;
            }
        }

        /* Navbar Styles */
        .navbar {
            width: 100%;
            background-image: url("../Pictures/wood%20background.jpg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            padding: 5px 0;
            box-sizing: border-box;
        }

        .navbar-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
        }

        .navbar ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            flex: 1;
        }

        .navbar li {
            padding: 0 4px;
        }

        .navbar a {
            text-decoration: none;
            color: white;
            font-size: 1.1em;
            display: block;
            padding: 10px;
            text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
        }

        .navbar a:hover, .navbar a.active {
            background-color: #575757;
            color: yellow;
            border-radius: 4px;
        }

        .menu-toggle {
            display: block;
            font-size: 1.5em;
            cursor: pointer;
            color: white;
            padding: 10px 20px;
            background-color: rgba(0, 0, 0, 0.5);
            border: none;
            border-radius: 4px;
            text-align: center;
            margin: 0 auto; /* Center the button horizontally */
        }

        /* Hide menu toggle on desktop */
        .menu-toggle {
            display: none; /* Hidden by default */
        }

        /* Center the title */
        h1 {
            text-align: center;
        }

        /* Center the containers for sire, dam, male offspring, and female offspring */
        .horizontal-container {
            display: flex;
            justify-content: center;
        }

        .genotype-container {
            position: relative;
            width: 45%;
            margin: auto;
            margin-top: 20px;
            text-align: center;
            margin-bottom: 0px;
        }

        .genotype-container p:first-of-type {
            font-weight: bold;
        }

        /* Suggestion container */
        .suggestion-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            margin-top: 0px;
        }

        /* Adjust the position of the suggestion dropdowns */
        #sireSuggestions,
        #damSuggestions {
            position: absolute;
            width: 100%;
            margin-top: 10px;
            left: 0;
            z-index: 1000;
        }

        /* Buttons container */
        .buttons-container {
            text-align: center;
            margin-top: 20px;
        }

        .results-container {
            display: flex;
            justify-content: space-between;
            text-align: center;
        }

        .male-container,
        .female-container {
            width: 120%;
        }

        .offspring-container {
            margin: 60px 0;
        }

        /* Add more margin between male and female containers */
        .male-container {
            margin-right: 20px;
        }

        .female-container {
            margin-left: 20px;
        }

        .offspring-variety {
            text-align: center;
            vertical-align: top;
        }

        .genotype-image img {
            width: auto;
            max-width: 240px;
            height: auto;
            max-height: 240px;
            object-fit: contain;
            display: inline-block;
            margin-bottom: 10px;
            border: 7px solid black;
        }

        .input-container {
            margin-bottom: 75px;
            display: flex;
            justify-content: space-between;
        }

        .input-container label,
        .input-container input {
            margin-bottom: 25px;
        }

        .input-container input {
            width: calc(25% - 5px);
        }

        /* Base styles for offspring varieties */
        .offspring-variety {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            margin-bottom: 20px;
        }

        /* Responsive image settings */
        .offspring-variety img {
            width: 100%;
            max-width: 150px;
            height: auto;
            margin-bottom: 10px;
            border: 2px solid black;
            box-sizing: border-box;
        }

        /* Text block adjustments */
        .offspring-variety div {
            display: block;
            width: 100%;
        }

        /* Responsive adjustments */
        @media (min-width: 601px) {
            .offspring-variety {
                flex-direction: row;
                justify-content: flex-start;
            }

            .offspring-variety img {
                margin-right: 10px;
            }

            .offspring-variety div {
                margin-left: 12px;
            }
        }

        .subtitle {
            text-align: center;
            margin-top: 10px;
            width: 100%;
            position: relative;
            left: 50%;
            transform: translateX(-50%);
        }

        .header-container {
            position: relative;
        }

        /* Base styles for logos, including border properties */
        .logo {
            width: 150px;
            height: auto;
            position: absolute;
            top: 10px;
            border: 4px solid maroon;
        }

        .left-logo {
            left: 10px;
        }

        .right-logo {
            right: 10px;
        }

        .titles-container {
            text-align: center;
            width: 100%;
            position: relative;
            padding: 20px 0;
        }

        .genotypes-note {
            text-align: center;
            font-weight: bold;
            border: 10px solid maroon;
            padding: 2px;
        }

        @media only screen and (max-width: 600px) {
            .logo {
                width: 80px;
                top: 20px;
                border: 3px solid maroon;
            }

            .left-logo {
                left: 5%;
            }

            .right-logo {
                right: 5%;
            }

            .titles-container {
                padding-top: 100px;
            }

            h1 {
                font-size: 24px;
            }

            .subtitle {
                font-size: 18px;
            }

            /* Adjust default images for portrait view */
            .genotype-image img {
                width: auto;
                max-width: 120px; /* Smaller size for portrait view */
                height: auto;
                max-height: 120px;
                object-fit: contain;
                display: inline-block;
                margin-bottom: 10px;
                border: 7px solid black;
            }
        }

        input[type="text"],
        button {
            font-size: 1em;
            padding: 10px;
        }

        .horizontal-container {
            display: flex;
            justify-content: center;
            width: 100%;
            flex-wrap: wrap;
            margin-top: 20px;
        }

        .input-group {
            flex: 1 1 45%;
            position: relative;
            max-width: 400px;
            margin: 0 2.5%;
        }

        .dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            background-color: white;
            border: 1px solid #ccc;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            display: none;
        }

        label {
            display: block;
        }

        input[type="text"] {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            margin-top: 5px;
        }

        @media (max-width: 800px) {
            .input-group {
                flex-basis: 100%;
                margin: 10px 0;
                text-align: center;
            }
        }

        #sireSuggestions div,
        #damSuggestions div {
            cursor: pointer;
        }

        .offspring-variety img {
            width: 150px;
            height: 150px;
            object-fit: contain;
            border: 2px solid black;
            padding: 10px;
            box-sizing: border-box;
            background-color: #f5f5f5;
            margin-bottom: 10px;
        }

        .summary-chart-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 20px;
        }

        .summary-chart {
            border-collapse: collapse;
            width: 80%;
            max-width: 1000px;
            margin: 20px auto;
            background-color: white;
        }

        .summary-chart th,
        .summary-chart td {
            border: 1px solid black;
            padding: 8px;
            text-align: center;
        }

        .summary-chart th {
            background-color: lightgreen;
        }

        @media only screen and (max-width: 600px) {
            .buttons-container {
                display: flex;
                justify-content: center; /* Centers the buttons */
                align-items: center;
                width: 50%; /* Ensures the container fits the screen */
                margin: 0 auto; /* Centers the container */
                padding: 0; /* Removes any extra padding */
                gap: 1px; /* Slight space between the buttons */
            }

            .buttons-container button {
                width: auto; /* Buttons take their natural size */
                white-space: nowrap; /* Prevents text from wrapping */
                padding: 8px 12px; /* Smaller padding to reduce button size */
                font-size: 0.9em; /* Reduces font size slightly for smaller buttons */
                margin: 0; /* No extra margin */
                border: 2px solid maroon; /* Consistent border */
            }
        }

       #returnToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position for visibility during scrolling */
    bottom: 20px; /* Distance from the bottom of the viewport */
    right: 20px; /* Distance from the right of the viewport */
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #1E82E6;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Ensure it appears above other elements */
}

#returnToTopBtn:hover {
    background-color: #333; /* Darker color on hover */
}


        /* Mobile menu adjustments */
        @media (max-width: 800px) {
            .menu-toggle {
                display: block;
            }

            .navbar ul {
                display: none;
                width: 100%;
                background-color: rgba(0, 0, 0, 0.9);
                flex-direction: column;
            }

            .navbar ul.active {
                display: flex;
            }

            .navbar li {
                padding: 10px 0;
                text-align: center;
            }

            .navbar a {
                padding: 10px 0;
                font-size: 1.2em;
            }

            .titles-container {
                text-align: center;
                width: 100%;
                position: relative;
                padding: 20px 0;
            }
        }

        footer {
            font-weight: bold;
        }

        @media only screen and (max-width: 600px) {
            .results-container {
                display: flex;
                justify-content: center;
                width: 100%;
                margin: 0 auto;
                text-align: center;
            }

            .male-container,
            .female-container {
                width: 45%; /* Keep male on left and female on right */
                text-align: center;
                margin: 0 2.5%; /* Add slight margin to keep spacing */
                Font-weight: bold;
            }

            .offspring-list {
                padding: 0;
                margin: 0 auto;
                width: 100%;
            }
        }

        .offspring-variety p:first-of-type {
            font-weight: bold;
        }

        .offspring-variety p:not(:first-of-type) {
            font-weight: normal; /* Ensure all other text is not bold */
        }

        /* Popup Styles */
        .popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #1E82E6; /* Blue background */
            color: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            display: none; /* Hidden by default */
            font-size: 1.2em;
            text-align: center;
        }
        
        
        /* Image settings to prevent warping and fit within the container */
.offspring-item img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Fit whole image without cropping or warping */
    transition: transform 0.3s ease; /* Smooth transition for enlargement */
    cursor: pointer;
}

/* Enlarged image styling for Sire and Dam on Desktop */ 
.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2); /* Larger scale for click-to-enlarge */
    z-index: 1000;
    cursor: zoom-out;
    background-color: rgba(0, 0, 0, 0.8); /* Background for focus effect */
    padding: 10px;
    border-radius: 10px;
}

/* Enlarged styling specifically for offspring images on Desktop */
.enlarged-offspring {
    transform: translate(-50%, -50%) scale(3); /* Larger scale for offspring images only */
}

  /* Responsive adjustments for mobile screens */

/* Sire and Dam Enlarged Image Adjustments */
@media (max-width: 768px) and (orientation: portrait) {
    .sire-dam-enlarged {
        max-width: 100vw; /* Adjust sire and dam size for portrait */
        max-height: 100vh;
        transform: translate(-50%, -50%) scale(2); /* Adjust scaling for portrait */
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .sire-dam-enlarged {
        max-width: 100vw; /* Adjust sire and dam size for landscape */
        max-height: 100vh;
        transform: translate(-50%, -50%) scale(2.5); /* Adjust scaling for landscape */
    }
}

/* Offspring Enlarged Image Adjustments */
@media (max-width: 768px) and (orientation: portrait) {
    .offspring-enlarged {
        max-width: 100vw; /* Adjust offspring size for portrait */
        max-height: 100vh;
        transform: translate(-50%, -50%) scale(4); /* Adjust scaling for portrait */
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .offspring-enlarged {
        max-width: 100vw; /* Adjust offspring size for landscape */
        max-height: 100vh;
        transform: translate(-50%, -50%) scale(2.5); /* Adjust scaling for landscape */
    }
}



/* Results Container */
.results-container {
    display: flex;
    flex-direction: row; /* Keep male and female results side by side */
    justify-content: space-between;
    align-items: flex-start;
    text-align: center;
    gap: 20px; /* Space between male and female sections */
    margin: 0 auto;
    position: relative; /* To allow the vertical divider to be positioned */
}

/* Male and Female Containers */
.male-container,
.female-container {
    width: 45%; /* Ensure both sections are equal */
    text-align: center;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box; /* Ensure padding and margins don’t affect width */
}

/* Center Offspring Titles */
.male-container h2,
.female-container h2 {
    text-align: center;
    margin-bottom: 10px;
}

/* Vertical Divider Line */
.results-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* Center the divider */
    width: 1px; /* Thin divider */
    background-color: blue; /* Divider color */
    transform: translateX(-50%);
    z-index: 1; /* Ensure it appears above background but below text */
}

/* Offspring Varieties */
.offspring-variety {
    display: flex;
    flex-direction: column; /* Stack adult and poult images */
    align-items: center; /* Center images and text */
    gap: 0; /* Remove space between adult and poult images */
    margin: 10px 0;
    height: auto; /* Automatically adjust height based on content */
    box-sizing: border-box; /* Prevent overflow issues */
}

/* Images (Adult and Poult) - Adjustable Size */
:root {
    --offspring-image-size: 80px; /* Default size, easy to adjust */
}

.offspring-variety img {
    width: auto;
    max-width: var(--offspring-image-size); /* Dynamic size adjustment */
    height: auto; /* Automatically adjust height */
    margin: 0; /* Remove space around images */
    object-fit: contain; /* Ensure the entire image fits without cropping */
}

/* Center Text Under Images */
.offspring-variety p {
    margin: 5px 0 0 0; /* Adjust spacing above and below text */
    text-align: center; /* Center text directly under each image */
    line-height: 1.2; /* Adjust line height for compactness */
}

/* Mobile Layout Fixes */
@media (max-width: 600px) {
    .results-container {
        flex-direction: row; /* Keep side-by-side layout */
        justify-content: center; /* Center both containers */
        gap: 10px;
    }

    .male-container,
    .female-container {
        width: 50%; /* Adjust width for smaller screens */
        margin: 0 auto; /* Center male and female sections */
    }

    .offspring-variety {
        gap: 0; /* Ensure no space between adult and poult images */
    }

    .offspring-variety img {
        max-width: calc(var(--offspring-image-size) * 0.8); /* Slightly smaller for mobile */
        height: auto; /* Ensure proper scaling */
    }

    /* Vertical Divider for Mobile */
    .results-container::after {
        display: block; /* Ensure the divider remains visible */
        height: auto; /* Adjust dynamically for mobile layout */
    }
}

/* Default Offspring Image Sizes */
:root {
    --desktop-offspring-image-size: 150px; /* Default desktop size */
    --mobile-landscape-offspring-image-size: 80px; /* Default landscape size */
    --mobile-portrait-offspring-image-size: 75px; /* Default portrait size */
}

/* General Offspring Image Styling */
.offspring-variety img {
    width: auto;
    max-width: var(--desktop-offspring-image-size); /* Desktop size by default */
    height: auto;
    margin: 0;
    object-fit: contain; /* Prevent cropping or warping */
}

/* Responsive Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .offspring-variety img {
        max-width: var(--mobile-landscape-offspring-image-size); /* Landscape size */
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .offspring-variety img {
        max-width: var(--mobile-portrait-offspring-image-size); /* Portrait size */
    }
}




#audioControls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#audioControls input[type="range"] {
    width: 150px;
}

#audioControls button {
    padding: 5px 15px;
    background-color: #1E82E6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#audioControls button:hover {
    background-color: #333;
}

#errorModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1E82E6;
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    text-align: center;
}

#errorModal button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: white;
    color: #1E82E6;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#errorModal button:hover {
    background-color: #ccc;
}



    
    


    
  /* Responsive Paywall Layout for Portrait Mobile */
@media (max-width: 700px) and (orientation: portrait) {
  .paywall-row {
    flex-direction: column !important;   /* stack vertically */
    align-items: center !important;
  }

  .pay-option {
    width: 100% !important;
    max-width: 360px !important;         /* keeps them readable size */
    margin: 6px 0 !important;
  }

  #donationPopup {
    max-width: 95vw !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding-bottom: 60px !important;
  }

  .sticky-close {
    position: static !important;
    margin-top: 12px !important;
  }

/* horizontal paywall layout and button polish */
#donationPopup {
  max-width: 760px; width: 95vw;
  max-height: 90vh; overflow-y: auto;
  padding: 18px 20px; box-sizing: border-box;
  text-align: center; border-radius: 10px;
}
.paywall-row {
  display: flex; justify-content: space-between;
  gap: 10px; flex-wrap: nowrap; width: 100%;
}
.pay-option {
  flex: 1; background: #f9f9f9;
  border: 1px solid #ccc; border-radius: 8px;
  padding: 8px; text-align: center;
  font-size: 13px; box-sizing: border-box;
}
.pay-option strong {
  display: block; margin-bottom: 6px;
  color: #1E82E6; font-size: 14px;
}
.amount-btn {
  background: #f0f0f0; border: 1px solid #ccc;
  border-radius: 20px; padding: 4px 10px;
  cursor: pointer; font-size: 13px;
}
.amount-btn:hover { background: #1E82E6; color: white; border-color: #1E82E6; }

#donationPopup input[type="email"] {
  width: 100%; max-width: 320px;
  font-size: 14px; padding: 6px;
}
#unlockEmailBtn {
  background: #1E82E6; color: #fff;
}
#donationPopup button[onclick="resetUnlockEmail()"] {
  background: #ccc; color: #000;
}
.sticky-close button {
  background: #000; color: #fff;
  border: none; border-radius: 6px;
  padding: 6px 12px; cursor: pointer;
  font-size: 13px; box-shadow: 0 0 10px rgba(0,0,0,0.15);
}

}

/*  Mobile-only: refined layout for PayPal containers and logos */
@media (max-width: 768px) {
  /* Hide empty PayPal containers by default */
  [id*="paypal-button-container"] {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* When PayPal is rendered (iframe or button present) */
  [id*="paypal-button-container"]:has(iframe),
  [id*="paypal-button-container"]:has(.paypal-buttons) {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 12px !important;
    margin-bottom: 45px !important;   /* buffer below logo */
    padding-bottom: 50px !important;  /* space for “Powered by PayPal” logo */
    overflow: visible !important;
    position: relative;
  }

  /* Makes PayPal elements fill width & stay contained */
  #donationPopup iframe[src*="paypal.com"],
  #donationPopup .paypal-buttons,
  #donationPopup .paypal-powered-by,
  #donationPopup div[class*="powered-by"],
  #donationPopup img[alt*="PayPal"] {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-top: 8px !important;
  }

  /* Enlarge credit-card input fields */
  #donationPopup input[type="text"],
  #donationPopup input[type="email"],
  #donationPopup input[type="number"],
  #donationPopup select {
    font-size: 1.2rem !important;
    padding: 0.7em !important;
  }

  /* Keep form comfortable on Safari/iOS */
  #donationPopup form {
    zoom: 1.07;
    padding-bottom: 30px !important;  /* allow scroll past Pay button */
  }

  /* Makes the popup scrollable when PayPal expands for card input */
  #donationPopup {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 90vh !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Portrait tuning: scale & contain iframe perfectly */
  #donationPopup iframe[src*="paypal.com"] {
    transform: scale(0.88) !important;       /* balanced shrink for portrait */
    transform-origin: top center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* Add gentle inner padding to avoid edge contact */
  #donationPopup [id*="paypal-button-container"] {
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box !important;
  }
}

/*  Extra small devices (under 400px wide) */
@media (max-width: 400px) {
  #donationPopup iframe[src*="paypal.com"] {
    transform: scale(0.85) !important;
  }
}

/*  Landscape mobile refinement: makes popup wider */
@media (orientation: landscape) and (max-height: 500px) {
  #donationPopup {
    max-width: 95vw !important;       /* use nearly full screen width */
    left: 50% !important;
    transform: translateX(-50%) translateY(-50%) !important;
    font-size: 1.05rem;               /* small readability bump */
  }

  [id*="paypal-button-container"]:has(iframe),
  [id*="paypal-button-container"]:has(.paypal-buttons) {
    margin-bottom: 60px !important;   /* extra vertical breathing room */
    padding-bottom: 60px !important;
  }

  /* Center iframe properly in landscape  */
  #donationPopup iframe[src*="paypal.com"] {
    transform: scale(0.9) !important;
    transform-origin: top center !important;
    margin: 0 auto !important;
    display: block !important;
  }
}

/* force-center and align the "Already Donated?" gray box */
#donationPopup div[style*="background:#f1f1f1"] {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;            /* fill the popup’s inner width */
  max-width: none !important;
  margin: 8px 0 !important;
  padding: 12px 14px !important;      /* even inner spacing */
  border-radius: 8px !important;
  text-align: center !important;
  transform: translateX(2px);         /* tiny nudge to the right for perfect centering */
}

/* Tweak email input and buttons alignment */
#unlockEmail {
  width: 90% !important;
  max-width: 300px !important;
  margin: 6px auto !important;
  display: block !important;
}

#donationPopup div[style*="gap:6px"] {
  flex-wrap: wrap !important;
  justify-content: center !important;
}



/* Base look matches your theme */
#switchAdvancedBtn {
  border: 3px solid black;
  background: blue;
  color: white;
  border-radius: 8px;
  padding: 4px 4px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  display: inline-block; /* ensures full-area hover */
}


/* Hover */
#switchAdvancedBtn:hover {
  background: lime;
  color: black;
  border-color: #1E82E6;
}


/* Fine-tune spacing between suggestion boxes and Sire/Dam row on mobile */
@media screen and (max-width: 768px) {
  /* specifically target the 2nd horizontal-container (the Sire/Dam row) */
  .horizontal-container:nth-of-type(2) {
    margin-top: 4px !important;  /* was negative; small positive gives a tiny gap back */
  }

  .genotype-container {
    margin-top: 0 !important;
  }

  .genotype-container h2 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    line-height: 1 !important;
  }
}


/* Tighten spacing between Sire/Dam titles and their image containers */
.genotype-container h2 {
  margin-bottom: 6px !important;  /* reduce space under title (default is ~20px) */
}

.genotype-image {
  margin-top: 0 !important;       /* ensure no top gap pushing it down */
  padding-top: 0 !important;
}



/* Slightly reduce Sire/Dam image size in mobile landscape */
@media screen and (max-width: 900px) and (orientation: landscape) {
  .genotype-image img {
    max-width: 150px !important;  /* was likely around 150–180px */
    max-height: 150px !important;
  }
}


/* Fine-tune spacing between suggestion boxes and Sire/Dam row on mobile landscape */
@media screen and (max-width: 900px) and (orientation: landscape) {
  /* specifically target the 2nd horizontal-container (the Sire/Dam row) */
  .horizontal-container:nth-of-type(2) {
    margin-top: 4px !important;   /* add slight space back (adjust 2–6px as needed) */
  }

  .genotype-container h2 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    line-height: 1 !important;
  }

  .genotype-container {
    margin-top: 0 !important;
  }
}

/* Reduce space between "Calculate by Variety Name" subtitle and the Sire suggestion box */
.titles-container {
  margin-bottom: 3px !important;   /* adjust smaller or larger as needed */
}

@media (max-width: 768px) {
  .titles-container {
    margin-bottom: 3px !important; /* tighter on mobile */
  }
}

/* tighten subtitle-to-suggestion spacing specifically for mobile portrait */
@media screen and (max-width: 768px) and (orientation: portrait) {
  .titles-container {
    margin-bottom: 0 !important;      /* eliminates default spacing */
    padding-bottom: 0px !important;   /* small controlled gap */
  }

  /* optional: ensure the first horizontal container (suggestions) isn’t pushing down */
  .horizontal-container:first-of-type {
    margin-top: 0 !important;
  }
}

/* tighten subtitle-to-suggestion spacing for mobile landscape */
@media screen and (max-width: 900px) and (orientation: landscape) {
  .titles-container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .horizontal-container:first-of-type {
    margin-top: 0 !important;
  
}
 
}


/* DNA Helix Loader (v27 final line pause for "Now Ready to Calculate") */

#dnaLoaderContainer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 320px;
  background: black;
  border-radius: 16px;
  box-shadow: 0 0 28px rgba(30,130,230,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s ease;
  overflow: hidden;
  border: 4px solid transparent;
}

#dnaLoaderContainer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 4px;
  background: linear-gradient(130deg,#1E82E6,#00ffc6,#b84dff,#1E82E6);
  background-size: 400% 400%;
  animation: dnaBorderFlow 6s linear infinite;
  z-index: -1;
  filter: blur(4px);
}

@keyframes dnaBorderFlow {
  0%{background-position:0% 50%;}
  50%{background-position:100% 50%;}
  100%{background-position:0% 50%;}
}

#dnaLoaderContainer canvas {
  width: 380px;
  height: 200px;
  transform-origin: center center;
}

#dnaLoaderContainer .loadingText {
  color:white;
  font-family:Arial,sans-serif;
  font-size:1.6rem;
  font-weight:bold;
  margin-top:18px;
  text-shadow:0 0 10px #1E82E6;
  letter-spacing:0.6px;
  opacity:0;
  transition:opacity 0.8s ease;
  text-align:center;
}

#dnaLoaderContainer .visible { opacity:1; }

.dot {
  opacity:0;
  display:inline-block;
  animation:dnaDotFade 3s ease-in-out infinite;
}
@keyframes dnaDotFade {
  0%,15%{opacity:0;}
  30%,70%{opacity:1;}
  85%,100%{opacity:0;}
}
@media screen and (max-width:768px) and (orientation:portrait){
  #dnaLoaderContainer{
    width:95vw;
    height:270px;
    left:48%;               
    transform:translate(-50%, -50%);
  }
  #dnaLoaderContainer canvas{width:85%;height:auto;}
  #dnaLoaderContainer .loadingText{font-size:1.2rem;}
}


/*  Landscape */
@media screen and (max-height:800px) and (orientation:landscape){
  #dnaLoaderContainer{width:70vw;height:265px;}
  #dnaLoaderContainer canvas{width:63%;height:auto;}
  #dnaLoaderContainer .loadingText{
    font-size:1.3rem;
    margin-top:30px; 
  }
}


/* ️ Force desktop size */
@media screen and (min-width: 1000px) {
  #dnaLoaderContainer {
    width: 600px !important;   
    height: 320px !important;  
  }

  #dnaLoaderContainer canvas {
    width: 380px !important;
    height: 200px !important;
  }

  #dnaLoaderContainer .loadingText {
    margin-top: 25px !important;
    font-size: 1.6rem !important;
  }
}

