/* =============================================================================
   Ernest Wilson - framed pages theme  (deployed as /css/framed-theme.css)

   Since 2026-10-28 www.ernest-wilson.co.uk is Bespoke Digital's own site and the
   AO-hosted Ernest pages (login, account pages, actions.aspx panel) are only seen
   inside their iframes. This file re-skins them to match the parent site:
   DM Sans, sentence case, Bespoke's orange / navy, 6px radii.

   Loaded AFTER style-sheet.css by CMS/Layouts/ErnestMasterPage.Master, and by the
   shared EAS actions.aspx (which links /css/framed-theme.css on every client site;
   a site without the file just 404s it).

   The /css folder is served with a 120-day max-age: never edit in place without
   bumping the ?v= in BOTH the master page and actions.aspx.

   Source of truth: AgencyOffice-git/docs/ernest-framed-theme.css
   Colours taken from Bespoke's build CSS (oklch tokens converted to hex).
   ============================================================================= */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap");

:root {
    --ew-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --ew-orange: #E57C3B;        /* brand-orange / secondary - primary buttons */
    --ew-orange-dark: #C75E1D;   /* brand-dark-orange - hover / active */
    --ew-orange-tint: #FDEEDE;   /* brand-lightest-orange */
    --ew-navy: #293D4F;          /* brand-light-blue / primary - headings */
    --ew-navy-dark: #15293B;     /* brand-dark-blue */
    --ew-text: #111826;          /* gray-900 - body text, input text */
    --ew-muted: #6C727E;         /* gray-500 - help text */
    --ew-border: #D1D5DB;        /* input border */
    --ew-grey-bg: #F5F5F5;       /* brand-light-grey */
    --ew-radius: 6px;
}

/* ---- Type --------------------------------------------------------------- */
body {
    font-family: var(--ew-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ew-text);
    text-transform: none;
    letter-spacing: normal;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--ew-font);
    color: var(--ew-navy);
    text-transform: none;
    letter-spacing: -0.01em;
    font-weight: 500;
    line-height: 1.2;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
p, li, td, th, span, div { letter-spacing: normal; }
a { color: var(--ew-navy); }
a:hover, a:focus { color: var(--ew-orange-dark); }

label, label.checkbox {
    font-family: var(--ew-font);
    text-transform: none;
    letter-spacing: normal;
    font-size: 14px;
    font-weight: 500;
    color: var(--ew-text);
}
label.checkbox { font-weight: 400; }

/* ---- Inputs ------------------------------------------------------------- */
/* first selector mirrors style-sheet.css's :not() chain, which otherwise outranks these */
input:not([type="checkbox"]):not([type="radio"]):not([type="image"]):not([type="button"]):not([type="submit"]),
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="search"], input:not([type]), select, textarea,
.Rtextbox, .RPCodetextbox, .textbox {
    font-family: var(--ew-font);
    font-size: 14px;
    line-height: 24px;
    color: var(--ew-text);
    background-color: #FFFFFF;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    text-transform: none;
    letter-spacing: normal;
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="search"], input:not([type]), select,
.Rtextbox, .RPCodetextbox, .textbox { padding: 10px 12px; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ew-navy);
    box-shadow: 0 0 0 2px rgba(41, 61, 79, 0.35);
}
/* the old red chevron PNG -> navy chevron */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23293D4F' stroke-width='1.8'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
    background-size: 18px 18px;
    background-position: right 12px center;
    padding-right: 40px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--ew-orange); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    font-family: var(--ew-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: normal;
    text-transform: none;
    border-radius: var(--ew-radius);
    height: auto;
    min-height: 40px;
    padding: 10px 24px;
    gap: 8px;
    background-color: var(--ew-navy);
    color: #FFFFFF;
}
.btn:hover, .btn:focus { background-color: var(--ew-navy-dark); color: #FFFFFF; }
.btn.primary, .btn.secondary.primary { background-color: var(--ew-orange); color: #FFFFFF; border: none; }
.btn.primary:hover, .btn.primary:focus { background-color: var(--ew-orange-dark); color: #FFFFFF; }
/* Bespoke's buttons carry no arrow icon */
.btn.primary:before { display: none; content: none; }
.btn.secondary {
    background-color: #FFFFFF;
    color: var(--ew-navy);
    border: 1px solid var(--ew-border);
}
.btn.secondary:hover, .btn.secondary:focus { background-color: var(--ew-grey-bg); color: var(--ew-navy); }
.btn.danger { border-radius: var(--ew-radius); }
.btn:focus-visible { outline: 2px solid var(--ew-navy); outline-offset: 2px; }

/* account menu (Dashboard / My Portfolio / ...): quiet tabs, current page in orange */
.btn.primary.no-icon {
    background-color: #FFFFFF;
    color: var(--ew-navy);
    border: 1px solid var(--ew-border);
    font-size: 14px;
    min-height: 40px;
    padding: 8px 16px;
}
.btn.primary.no-icon:hover, .btn.primary.no-icon:focus {
    background-color: var(--ew-orange-tint);
    border-color: var(--ew-orange);
    color: var(--ew-navy);
}
/* ernest-dashboard-menu.js marks the current page li.current + aria-current; selector
   mirrors style-sheet.css's so it wins on specificity */
ul.ernest-account-menu li.current a.btn.primary {
    background-color: var(--ew-orange);
    border-color: var(--ew-orange);
    color: #FFFFFF;
}

/* ---- actions.aspx panel (shared EAS page, .aw root) --------------------- */
.aw { font-family: var(--ew-font); font-size: 15px; color: var(--ew-text); }
.aw h2 { color: var(--ew-navy); font-weight: 600; }
.aw button, .aw a.btn {
    font-family: var(--ew-font);
    font-weight: 600;
    border: 1px solid var(--ew-border);
    border-radius: var(--ew-radius);
    background: #FFFFFF;
    color: var(--ew-navy);
    min-height: 0;
}
.aw button:hover, .aw a.btn:hover, .aw button:focus, .aw a.btn:focus {
    background: var(--ew-orange-tint);
    border-color: var(--ew-orange);
    color: var(--ew-navy);
}
.aw button[aria-expanded="true"] { background: var(--ew-orange-tint); border-color: var(--ew-orange); }
/* the Send buttons inside the Arrange Viewing / Enquiry panels */
.aw .panel button {
    background: var(--ew-orange);
    border-color: var(--ew-orange);
    color: #FFFFFF;
}
.aw .panel button:hover, .aw .panel button:focus {
    background: var(--ew-orange-dark);
    border-color: var(--ew-orange-dark);
}
.aw input[type=text], .aw input[type=email], .aw textarea {
    border-radius: var(--ew-radius);
    border-color: var(--ew-border);
    padding: 10px 12px;
}
.aw .note { color: var(--ew-muted); }
