﻿/* Container grouping Labour/Other Rates sections */
.rates-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    min-height: 300px;
}

/* Cohesive block for LH/RH columns - forces them to drop together on mobile */
.rates-column {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
}

/* Individual Rate Row */
.rate-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    gap: 10px;
}

/* Flexible Label - Wider and professional (150px instead of the old W120) */
.rate-label {
    flex: 0 0 170px;
    font-size: 0.9rem;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* Maintaining your original input sizing */
.rate-input-wrapper {
    display: flex;
    align-items: center; /* Vertically centers items */
    gap: 5px; /* Consistent gap between boxes */
}

.rate-input, .rate-dropdown {
    height: 25px !important; /* Identical height for inputs and dropdowns */
    box-sizing: border-box; /* Ensures padding doesn't increase width/height */
    padding: 0 8px; /* Consistent internal spacing */
    border: 1px solid #ccc;
    border-radius: 4px; /* Softer corners */
    font-size: 13px; /* Uniform text size */
    line-height: normal; /* Prevents text alignment offsets */
    font-family: Arial, sans-serif; /* Ensures fonts match */
}

/* 2. Specifics for the Currency Inputs */
.rate-input {
    width: 75px !important; /* Fixed width for currency */
    text-align: right;
    padding-right:3px !important;
}






/* A wider column specifically for Other Rates to accommodate the dropdown */
.rates-column-wide {
    flex: 1 1 480px; /* Increased from 320px to fit Label + 2 Inputs + Dropdown */
    display: flex;
    flex-direction: column;
}

/* The new dropdown styling */
.rate-dropdown {
    height: 25px !important;
    box-sizing: border-box;
    padding: 0 8px !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    width: 150px;
    margin: 0 0 0 5px !important; /* Reset top/bottom margins to 0. Keep Left margin 5px. */
    vertical-align: middle; /* Helps alignment in some browsers */
    background-color: #fff;
    color: #333;
    cursor: pointer;
}


/* NEW: A container specifically for vertical lists (Other Rates) */
.rates-list-section {
    display: flex;
    flex-direction: column; /* Forces strict vertical stacking */
    gap: 4px; /* Tighter 4px gap between rows */
    overflow: visible;
    min-height: 285px;
}

/* UPDATE: Remove margin-bottom, let the container gap handle spacing */
.rate-item-wide {
   
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1px;
    /* margin-bottom: 8px; <--- REMOVED to reduce space */
}

/* Container to keep the checkbox and label together during wraps */
.fixed-price-wrapper { 
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    white-space: nowrap;
}

.fixed-price-label {
    font-size: 0.85rem;
    color: #444;
    cursor: pointer;
}




/* Container for the icon column */
.fixed-price-column {
    width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The SVG Icon Style */
.padlock-svg {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    fill: #bdc3c7; /* Subtle Grey for Unlocked */
}

/* Locked state - change color and "pop" slightly */
.is-fixed .padlock-svg {
    fill: #f39c12; /* Vibrant Orange for Locked */
    filter: drop-shadow(0px 0px 2px rgba(243, 156, 18, 0.4));
}

.padlock-svg:hover {
    transform: scale(1.15);
}

/* Hides the checkbox while keeping it functional for JavaScript data collection */
.hidden-check {
    display: none !important;
    visibility: hidden;
    position: absolute;
}





/* Styling for the Max Minutes input */
.max-mins-input {
    width: 65px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px !important;
    font-size: 0.85rem;
}

/* Update the column to hold both padlock and mins */
.rate-extras-column {
    width: 120px; /* Increased width to fit both */
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}












/* Base style for the clickable legend boxes */
/* NEW: The wrapper that handles the responsive stacking */
.pricing-toggle-container {
    display: flex;
    flex-wrap: wrap; /* Forces items to drop to the next line if they don't fit */
    justify-content: flex-end; /* Keeps them perfectly centered */
    gap: 15px; /* Handles BOTH horizontal and vertical spacing automatically */
    margin-bottom: 10px;
    margin-right: 5px;
}

/* Modern, Apple-like Toggle Button */
.pricing-toggle-box {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 120px; /* Slimmed down from 220px */
    gap: 10px;
    padding: 7px 16px 7px 24px;
    margin-left: 10px; /* Space between the two buttons */
    border: 1px solid #d1d1d6; /* Soft Apple gray border */
    border-radius: 8px; /* Smooth, modern corners */
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    background-color: #ffffff;
    color: #555555; /* Muted text when inactive */
    font-size: 13px;
    font-weight: 500; /* Medium weight, much cleaner than bold */
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

    /* Hover effect */
    .pricing-toggle-box:hover {
        background-color: #f5f5f7;
    }

/* Active Highlight for Managing Agent (Orange) */
.toggle-active-agent {
    border-color: #ffb74d; background-color: #fffaf0; color: #e65100;
}

/* Active Highlight for Site Specific (Green) */
.toggle-active-site {
    border-color: #81c784; background-color: #f2fbf2; color: #1b5e20;
}

/* Ensure the little color squares look sharp */
.legend-swatch {
    width: 16px;
    height: 16px;
    display: inline-block;
    border: 1px solid #ccc;
}

/* Active Highlight for Part Price High (Pastel Blue) */
.toggle-active-high {
    border-color: #90caf9; background-color: #f0f7ff; color: #0d47a1;
}

/* Active Highlight for Part Price Low (Pastel Purple) */
.toggle-active-low {
    border-color: #ce93d8; background-color: #fbf5fc; color: #4a148c;
}


/* Push the entire row (label + buttons) to the right edge */
.pricing-row {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* <--- This pushes everything to the right together */
    margin-bottom: 12px;
    margin-right: 5px;
}

/* Soften the labels and set a fixed distance from the buttons */
.pricing-row-label {
    font-size: 14px;
    font-weight: 500;   /* <--- Softened from bold (600/700) to medium */
    color: #666666;     /* <--- Softened from dark/black to medium gray */
    margin-right: 15px; /* <--- Replaced 'auto' with a neat 15px gap */
}

/* Small, elegant status dots replacing the large squares */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

/* Modern styles for the top-left page title */
.page-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #333333; /* Dark gray, not pure black */
    position:absolute;
    overflow:hidden;
    left:20px;
    right:280px;
    white-space:nowrap;
}

.page-subtitle-prefix {
    color: #888888; /* Soft gray for the prefix */
    font-weight: 400; /* Normal weight */
    margin-right: 5px;  
}


/* The invisible wrapper that holds the icon and the text */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px; /* Space between the label and the icon */
    cursor: help;
}

/* The subtle (?) Icon */
.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #e5e5ea; /* Soft Apple-style gray */
    color: #8e8e93;
    font-size: 11px;
    font-weight: 600;
    font-family: sans-serif;
    transition: all 0.2s ease;
}

/* Darken the icon slightly when hovered */
.tooltip-wrapper:hover .info-icon {
    background-color: #d1d1d6;
    color: #333;
}

/* The Tooltip Balloon */

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 280px;
    background-color: #2c2c2e;
    color: #ffffff;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    /* FIX: Position it centered perfectly BELOW the icon */
    position: absolute;
    z-index: 1000;
    top: 150%; /* Changed from bottom: 150% */
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: normal;
}

    /* The little triangle pointing UP at the icon */
    .tooltip-text::after {
        content: "";
        position: absolute;
        bottom: 100%; /* FIX: Moved the triangle to the top of the balloon */
        left: 50%;
        margin-left: -6px;
        border-width: 6px;
        border-style: solid;
        /* FIX: Adjusted the border colors to make the arrow point UP */
        border-color: transparent transparent #2c2c2e transparent;
    }

/* Show the balloon on hover */
.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


/* For the new Rate column header and input */
.hourly-rate-input {
    width: 65px;
    text-align: right;
    border: 1px solid #d1d1d6;
    border-radius: 4px;
    padding: 3px !important;
    font-size: 13px;
    color: #333;
}


/* Modifier for tooltips on the right side of the screen */
.tooltip-text-right {
    left: auto !important;
    right: -10px !important; /* Anchors the balloon to the right side of the icon */
    transform: none !important; /* Removes the centering pull */
}

    /* Moves the pointer triangle to the right side of the balloon */
    .tooltip-text-right::after {
        left: auto !important;
        right: 12px !important; /* Slides the triangle over to point exactly at the icon */
        margin-left: 0 !important;
    }




    /* Container for the Advanced Settings */
.advanced-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two perfectly equal columns */
    gap: 30px; /* Nice wide breathing room between the columns */
    padding: 10px;
}








/* 1. HIDE THE CLUNKY NUMBER SPINNERS */
.advanced-input[type="number"]::-webkit-inner-spin-button,
.advanced-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.advanced-input[type="number"] {
    -moz-appearance: textfield; /* For Firefox */
}

/* 2. THE ROW WRAPPER (No longer stretches to the edges) */
.advanced-row {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Keeps everything grouped */
    margin-bottom: 16px;
}

/* 3. STRICT RIGHT-ALIGNED LABELS */
.advanced-label {
    width: 135px; /* Forces all labels to be the exact same width */
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Pushes text & tooltip to the right edge */
    gap: 6px; /* Clean spacing between the word and the (?) */
    margin-right: 15px; /* Rigid spacing between the (?) and the input box */
    font-size: 14px;
    font-weight: 500;
    color: #444444;
}

/* 4. STRICT IDENTICAL INPUT WIDTHS */
.advanced-input {
    width: 120px; /* Forces textboxes and dropdowns to perfectly match */
    box-sizing: border-box; /* Ensures padding doesn't break the width */
    text-align: right;
    border: 1px solid #d1d1d6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333333;
    transition: border-color 0.2s;
}

    .advanced-input:focus {
        border-color: #007aff;
        outline: none;
    }

/* 5. CHECKBOX ALIGNMENT CONTAINER */
.advanced-checkbox-container {
    width: 140px; /* Matches the input width perfectly */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligns checkboxes exactly where the textboxes start */
}

.advanced-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555555;
    cursor: pointer;
}





.advanced-input:focus {
    border-color: #007aff; /* Soft Apple blue focus state */
    outline: none;
}

/* Styling for the checkbox row */
.advanced-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555555;
}



/* The Dark Overlay Background */
.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px); /* Gives that modern frosted glass effect */
    z-index: 99999; /* Ensures it sits on top of absolutely everything */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

    /* Show classes for animation */
    .modern-modal-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }

/* The White Dialogue Box */
.modern-modal-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 650px;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
    overflow: hidden; /* Keeps the rounded corners clean */
    display: flex;
    flex-direction: column;
}

.modern-modal-overlay.is-visible .modern-modal-box {
    transform: translateY(0);
}

/* Header, Body, and Footer structuring */
.modern-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #ebebeb;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modern-modal-body {
    padding: 24px;
    background: #fdfdfd;
}

.modern-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #ebebeb;
    background: #f9f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Modern Apple-style Buttons */
.btn-modern {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-secondary {
    background: #e5e5ea;
    color: #333;
}

    .btn-secondary:hover {
        background: #d1d1d6;
    }

.btn-primary {
    background: #007aff;
    color: #ffffff;
}

    .btn-primary:hover {
        background: #005bb5;
    }



/* Modern, subtle outline button for secondary actions */
.btn-advanced-setup {
    min-width: 118px; 
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Space between icon and text */
    padding: 7px 21px;
    background-color: transparent;
    color: #666666; /* Soft grey text */
    border: 1px solid #d1d1d6; /* Matches your new input borders */
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Very soft grey fill on hover */
.btn-advanced-setup:hover {
    background-color: #f5f5f7;
    color: #333333;
    border-color: #c7c7cc;
}

/* Ensures the SVG icon scales correctly and inherits the text color */
.btn-advanced-setup svg {
    width: 14px;
    height: 14px;
    fill: currentColor; 
}

.rate-dropdown option:disabled {
    color: #b0b0b0 !important; /* A much lighter, washed-out grey */
    background-color: #f8f8f8 !important; /* A very soft grey background */
    font-style: italic; /* Adds a clear visual difference */
}


/* Forces uniform character width for perfect space-padding alignment */
.rate-dropdown {
    font-family: ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace !important;
}



























