/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
    --navy: #1f3a6b;
    --slate: #28506f;
    --slate-dark: #1f4159;
    --page: #f4f2ee;
    --card: #fbfaf8;
    --line: #d8dce2;
    --muted: #8a919c;
    --tool: #eeeeec;
    --text: #1b2430;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}

/* Layout */
.drop {
    max-width: 46rem;
    min-height: 100vh;            /* fallback for older browsers */
    min-height: 100svh;           /* stable on mobile even as the URL bar shows/hides */
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;      /* vertical centering */
}
@media (min-width: 640px) { .drop { padding-block: 2.5rem; } }

.drop__header { text-align: center; margin-bottom: 1.5rem; }
.drop__header h1 {
    margin: 0 0 1rem;
    font-family: Calibri, Carlito, "Segoe UI", system-ui, sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    line-height: 1.2;
    color: var(--navy);
    text-wrap: balance;
}
.drop__header h2 { color: var(--navy); font-weight: normal; }
.drop__header i { font-size: 20px; }

.drop__daily-prompt {
    margin-top: 1rem;
}

.drop__daily-prompt strong {
    display: block;
    color: var(--navy);
    font-size: 0.95rem;
}

.drop__daily-prompt p {
    margin: 0.35rem 0;
}

.drop__daily-prompt .drop__hint {
    color: var(--muted);
    font-size: 0.9rem;
}

/*.drop__learn { margin: 0; font-size: 1rem; color: #333; }*/
.drop__learn a { margin-left: .6rem; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* Card + fields */
.card {
    background: var(--card);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 24px rgba(31, 58, 107, .07);
}
@media (min-width: 640px) { .card { padding: 1.75rem 2rem; } }

.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: .5rem; font-weight: 700; color: var(--navy); }

.field select,
.field textarea,
.field input[type="text"]:focus-visible {
    width: 100%;
    font: inherit;
    font-size: 1rem;              /* 16px stops iOS zooming into the field */
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .85rem 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field ::placeholder { color: var(--muted); }

.field select {
    appearance: none;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f3a6b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}
.field select:invalid { color: var(--muted); }   /* "Please select..." looks like a placeholder */
.field select option { color: var(--text); }

.field select:focus-visible,
.field textarea:focus-visible,
.field input[type="text"]:focus-visible {
    outline: 3px solid rgba(40, 80, 111, .3);
    outline-offset: 1px;
    border-color: var(--slate);
}

/* Tool row: 2x2 on phones, one row of 4 from 640px up */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 0 0 1.25rem; }
.tools > .tool:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* odd count (no voice support): last button spans the row */
@media (min-width: 640px) {
    .tools { grid-template-columns: repeat(4, 1fr); }
    .tools[data-voice="off"] { grid-template-columns: repeat(3, 1fr); }
    .tools > .tool:last-child:nth-child(odd) { grid-column: auto; }
}

.tool {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 3rem; padding: .5rem .75rem;
    background: var(--tool); color: #222;
    border: 0; border-radius: 10px;
    font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.2;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tool:hover { background: #e4e4e1; }
.tool:active { transform: scale(.98); }
.tool:focus-visible { outline: 3px solid rgba(40, 80, 111, .35); outline-offset: 2px; }
.tool[aria-expanded="true"] { background: #dfe6ee; }
.tool[aria-pressed="true"] { background: #fdecea; color: #8a1f17; }          /* listening */
.tool[aria-pressed="true"] .tool__icon { animation: tool-pulse 1.2s ease-in-out infinite; }
@keyframes tool-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tool[aria-pressed="true"] .tool__icon { animation: none; } }
.tool__icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* Link field */
.link-row { display: flex; gap: .5rem; align-items: stretch; }
.link-row input { flex: 1; min-width: 0; }
.link-remove {
    flex: none; padding: 0 1rem; min-height: 3rem;
    background: #fff; color: var(--navy);
    border: 1px solid var(--line); border-radius: 10px;
    font: inherit; cursor: pointer;
}

/* Selected files */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.25rem 0 1.25rem; padding: 0; list-style: none; }
.chips:empty { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: .5rem; max-width: 100%;
    padding: .3rem .3rem .3rem .8rem;
    background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem;
}
.chip__name { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip__size { flex: none; color: var(--muted); }
.chip__remove {
    flex: none; width: 1.75rem; height: 1.75rem;
    border: 0; border-radius: 50%; background: var(--tool);
    font-size: 1.1rem; line-height: 1; cursor: pointer;
}

.tools__notice { margin: -.5rem 0 1rem; font-size: .875rem; color: #8a1f17; }
.tools__notice:empty { display: none; }

.sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Submit */
.submit {
    display: block; width: 100%; min-height: 3.5rem;
    border: 0; border-radius: 12px;
    background: var(--slate); color: #fff;
    font: inherit; font-size: 1.15rem; font-weight: 600; cursor: pointer;
}
.submit:hover { background: var(--slate-dark); }
.submit:disabled { opacity: .65; cursor: wait; }

/* Errors */
.errors { margin-bottom: 1rem; padding: .75rem 1rem; background: #fdecea; border: 1px solid #f5c2c0; border-radius: 10px; color: #8a1f17; }
.errors p { margin: .25rem 0; }

/* Dialogs (Learn more + confirmation) */
.dialog {
    position: fixed;
    border: 0;
    border-radius: 16px;
    padding: 1.5rem;

    width: min(48rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    box-sizing: border-box;

    color: var(--text);
    box-shadow: 0 12px 48px rgba(0, 0, 0, .28);
}
.dialog::backdrop { background: rgba(20, 30, 50, .45); }
.dialog h2 { margin: 0 0 .75rem; font-size: 1.2rem; color: var(--navy); text-align: center; }
.dialog p { margin: 8px 0 }
.dialog__close {
    position: absolute; top: .4rem; right: .6rem;
    padding: .25rem .6rem; border: 0; background: none;
    font-size: 1.75rem; line-height: 1; color: #555; cursor: pointer;
}
.video-placeholder {
    aspect-ratio: 16 / 9; display: grid; place-items: center;
    background: #e6e8ec; border-radius: 12px; color: #6b7380;
}
.all-prompts {
    padding-left: 1.25rem;
}

.all-prompts li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.dialog--confirm {
    width: min(20rem, calc(100vw - 3rem));
    text-align: center;
    font-family: Calibri, Carlito, "Segoe UI", system-ui, sans-serif;
    color: var(--navy);
}
.dialog--confirm h2 { margin: .25rem 0 1rem; font-size: 2.25rem; line-height: 1.1; font-weight: 700; color: var(--navy); }
.dialog--confirm .confirm__thanks { margin: 0 0 1rem; font-size: 1.15rem; line-height: 1.35; color: var(--navy); }
.dialog--confirm .confirm__brief  { margin: 0 0 1.5rem; font-size: 1.1rem; line-height: 1.35; color: var(--navy); }
.dialog--confirm .confirm__footer  { color: var(--muted); }
.dialog--confirm .submit { min-height: 3rem; font-size: 1.05rem; margin-bottom: 3rem; }
.confirm__check { margin: 0; font-size: 2.75rem; line-height: 1; color: #1a7f37; }

.logo { margin: 0 auto 3rem; text-align: center; }
.title { color: var(--navy); }
h2 { color: var(--navy); }
.image-fluid { max-height: 64px; width: auto; }
footer { margin-top: 3rem; text-align: center; color: var(--slate); }

.dialog--video {
    width: min(64rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
}

.dialog--video .video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.dialog--video .video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.dialog--video h2 {
    margin: 0 2rem 1rem 0;
}

.dialog--video .dialog__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
}

@media (max-width: 600px) {
    .dialog--video {
        padding: 1rem;
    }
}
