/* app.css — minimal global styles, Tailwind handles the rest */

/* prevent horizontal scroll on mobile */
html, body { overflow-x: hidden; max-width: 100vw; }

/* ensure all form elements respect container width */
input, select, textarea, button { max-width: 100%; box-sizing: border-box; }

/* prevent iOS auto-zoom on input focus (triggered when font-size < 16px) */
@media (max-width: 639px) {
    input, select, textarea { font-size: 16px !important; }
}

/* smooth page transitions */
#app {
    transition: opacity 0.1s ease;
}

/* ensure select elements look consistent */
select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem !important;
}

/* table layout */
table {
    border-collapse: collapse;
    width: 100%;
}

/* expand/collapse chevron affordance */
.expand-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: #f5f5f4;
    color: #57534e;
    transition: background 0.2s, color 0.2s, transform 0.3s;
    flex-shrink: 0;
}
.expand-chevron:hover {
    background: #e7e5e4;
    color: #292524;
}
.expand-chevron.open {
    background: #e7e5e4;
    transform: rotate(180deg);
}
.expand-chevron svg {
    width: 1rem;
    height: 1rem;
}
@keyframes chevron-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(1.15); }
}
.expand-chevron:not(.open) {
    animation: chevron-pulse 1.5s ease-in-out 3;
}

/* Quill editor overrides */
.ql-editor {
    min-height: 160px;
    font-size: 0.875rem;
}
.ql-toolbar.ql-snow {
    border-radius: 0.5rem 0.5rem 0 0;
    border-color: #e7e5e4;
}
.ql-container.ql-snow {
    border-radius: 0 0 0.5rem 0.5rem;
    border-color: #e7e5e4;
}

/* Quill editor images — resizable */
.ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.25rem 0;
    cursor: pointer;
}
.ql-editor img.ql-img-selected {
    outline: 2px solid #292524;
    outline-offset: 2px;
}

/* image resize toolbar (floating) */
.ql-img-toolbar {
    position: absolute;
    z-index: 50;
    display: flex;
    gap: 4px;
    background: #292524;
    padding: 4px 6px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.ql-img-toolbar button {
    color: #d6d3d1;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: transparent;
}
.ql-img-toolbar button:hover,
.ql-img-toolbar button.active {
    background: #44403c;
    color: #fff;
}

/* Quill content rendering (print, TV, user-facing) */
.ql-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}
.ql-content p {
    margin-bottom: 0.25em;
}
.ql-content ul, .ql-content ol {
    padding-left: 1.5em;
    margin-bottom: 0.5em;
}
