/* contact.css — dedicated /kontakt page (src/templates/page_contact.php).
   Section 2 (contact details + form + provozovatel) reuses the shared .contact-hero-section/
   .contact-layout/.contact-form/.form-control/etc. from styles.css (same classes
   section_contact.php uses everywhere else on the site) — only the sections around it, and
   the 3-card grid placement inside .contact-layout, are new and styled here. */

/* Vertical padding comes from the shared .section class (styles.css) — this one only needs
   its bottom half zeroed out, since Section 2 right below it already has its own top padding. */
.contact-page-hero {
    padding-bottom: 0;
}

/* Section 2's .contact-hero-section already has its own top/bottom padding — no heading here
   anymore (moved to .contact-page-hero above it), so pull it in a bit. */
.contact-hero-section {
    padding-top: 1.5rem;
}

/* 3 explicit grid areas instead of the shared class's plain 2-column split: kontakty (top
   left) + provozovatel (bottom left) stacked in column 1, formulář spanning both rows in
   column 2. DOM order is already kontakty → formulář → provozovatel, so collapsing to a
   single column on mobile (below) needs no reordering — the formulář isn't pushed down below
   the legal details. */
.contact-layout {
    grid-template-rows: auto auto;
    align-items: stretch;
}

/* Each left card stretches to fill its (possibly grown) row — the two rows' combined height
   always matches the form's, since it spans both — so the columns end up the same total
   height, with any extra space absorbed inside whichever card is shorter. */
.contact-card-details,
.contact-card-operator {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-card-details {
    grid-column: 1;
    grid-row: 1;
    /* .contact-details normally sits nested below other content (margin-top: 2rem) — here
       it's a direct grid item that should align flush with the top of the form beside it. */
    margin-top: 0;
}

.contact-card-form {
    grid-column: 2;
    grid-row: 1 / 3;
    position: relative;
}

/* Success overlay covering the whole form card after a successful send. */
.contact-success {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--clr-beige);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.contact-success[hidden] {
    display: none;
}

.contact-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--clr-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.contact-success-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--clr-green);
    margin: 0 0 0.75rem;
}

.contact-success-text {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0 0 1.5rem;
    max-width: 380px;
}

.contact-card-operator {
    grid-column: 1;
    grid-row: 2;
}

@media (max-width: 900px) {
    .contact-card-details,
    .contact-card-form,
    .contact-card-operator {
        grid-column: auto;
        grid-row: auto;
    }
}

.contact-form-privacy-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: underline;
}

/* --- "Než napíšete" --- */
/* Vertical padding + beige background come from the shared .section/.section--beige
   (styles.css) classes. */
.contact-before-section {
    text-align: center;
}

.contact-before-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-before-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
}

.contact-before-link:hover {
    color: var(--clr-green);
}

.contact-before-link svg {
    color: var(--clr-green);
}

/* --- "Pro školy a odborníky" — reuses .er-banner* (expert-reviews.css) --- */
/* Vertical padding comes from the shared .section class (styles.css). */

/* --- Card 2: Provozovatel — compact list, smaller type than the contact-details card above
   it (it's reference info, not something to read line by line). Same beige-box-on-white-card
   pattern as .contact-details uses for its own content. --- */
.contact-operator-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--clr-beige);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 0;
}

.contact-operator-list dt {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.contact-operator-list dd {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0;
}

/* --- Form: hidden honeypot, subject hint strip, extra fields, attachments --- */
.contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#contact-form [hidden] {
    display: none !important;
}

.contact-hint {
    background: color-mix(in srgb, var(--clr-green) 20%, #fff);
    border-radius: var(--radius-card, 15px);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.contact-hint-link {
    display: inline-block;
    margin-top: 0.3rem;
    font-weight: 600;
    color: var(--clr-green);
}

.contact-tag {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 0.25rem;
}

.contact-attachment-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.contact-attach-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* "Vyfotit" opens the camera only where the device has a touch screen (phone/tablet).
   On a PC the capture attribute would just open the file picker, so the button stays hidden
   by default and is shown only for coarse-pointer / no-hover devices. */
#contact-form .contact-attach-camera {
    display: none !important;
}

@media (pointer: coarse), (hover: none) {
    #contact-form .contact-attach-camera {
        display: inline-flex !important;
    }
}

.contact-attachments-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0.4rem 0 0;
}

.contact-attachment-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    background: var(--clr-beige);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    word-break: break-all;
}

.contact-attachment-remove {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-light);
}
