/*
 * EKK Uudised — Frontend stiilid
 * Põhineb Figma "Figma to Code" ekspordil
 * Kõik väärtused on otse Figmast
 */

:root {
    --ekk-font:             'Montserrat', sans-serif;
    --ekk-text-primary:     #000000;
    --ekk-text-secondary:   #454854;
    --ekk-text-tertiary:    #686B78;
    --ekk-orange-100:       #BA6C12;
    --ekk-orange-40:        #F4C58F;
    --ekk-orange-20:        #F9E2C7;
    --ekk-blue-100:         #42A5F5;
    --ekk-blue-20:          #E3F2FD;
    --ekk-beige-20:         #EFEEE7;
    --ekk-gray-300:         #C8C8D0;
    --ekk-gray-200:         #E9E9EC;
    --ekk-gray-100:         #F7F7F8;
    --ekk-white:            #FFFFFF;
    --ekk-black:            #000000;
    --ekk-radius:           4px;
}

.ekk-uudised-wrapper {
    font-family: var(--ekk-font);
    color: var(--ekk-text-primary);
    width: 100%;
}

/* LAYOUT */
.ekk-uudised-layout {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

@media (max-width: 768px) {
    .ekk-uudised-layout { flex-direction: column; gap: 32px; }
}

/* KÜLGRIBA */
.ekk-uudised-sidebar {
    width: 270px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (max-width: 768px) {
    .ekk-uudised-sidebar { width: 100%; }
}

/* FILTER */
.ekk-filter-blokk {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ekk-filter-pealkiri {
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
    margin: 0;
}

.ekk-filter-grupp {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ekk-filter-silt {
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    margin-bottom: 4px;
}

.ekk-filter-separator {
    height: 1px;
    background: var(--ekk-gray-300);
    margin-bottom: 6px;
}

/* Radio */
.ekk-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--ekk-radius);
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}

.ekk-radio input[type="radio"] { display: none; }

.ekk-radio-ring {
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    border: 2px solid var(--ekk-gray-300);
    background: var(--ekk-white);
    flex-shrink: 0;
    transition: all 0.15s;
}

.ekk-radio:has(input:checked) .ekk-radio-ring {
    background: var(--ekk-orange-40);
    border-color: var(--ekk-black);
    box-shadow: 0 0 0 4px white inset;
}

.ekk-radio:has(input:checked) .ekk-radio-label { font-weight: 700; }

/* Aasta dropdown */
.ekk-aasta-select {
    font-family: var(--ekk-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    padding: 12px 48px 12px 16px;
    background: var(--ekk-white);
    outline: 1px solid var(--ekk-gray-300);
    border: none;
    border-radius: 0;
    color: var(--ekk-text-primary);
    width: 100%;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='8' viewBox='0 0 16 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L8 7L15 1' stroke='%23686B78' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.ekk-aasta-select:focus { outline: 2px solid var(--ekk-orange-40); }

/* UUDISKIRJA BLOKK */
.ekk-uudiskiri-blokk {
    background: var(--ekk-blue-20);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.ekk-uudiskiri-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ekk-uudiskiri-ikoon { font-size: 32px; line-height: 1; }

.ekk-uudiskiri-pealkiri {
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    margin: 0;
}

.ekk-uudiskiri-tekst {
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
}

.ekk-uudiskiri-vorm {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.ekk-uudiskiri-blokk input[type="email"],
.ekk-uudiskiri-blokk input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--ekk-font);
    font-size: 16px;
    color: var(--ekk-text-secondary);
    background: var(--ekk-white);
    outline: 1px solid var(--ekk-gray-300);
    border: none;
    border-radius: 0;
    box-sizing: border-box;
}

.ekk-uudiskiri-blokk input[type="submit"],
.ekk-uudiskiri-blokk button[type="submit"] {
    width: 100%;
    padding: 12px 32px;
    background: var(--ekk-orange-40);
    color: var(--ekk-text-primary);
    border: none;
    border-radius: 0;
    font-family: var(--ekk-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 28.8px;
    cursor: pointer;
    transition: background 0.15s;
    box-sizing: border-box;
}

.ekk-uudiskiri-blokk input[type="submit"]:hover,
.ekk-uudiskiri-blokk button[type="submit"]:hover {
    background: var(--ekk-orange-100);
    color: var(--ekk-white);
}

/* NIMEKIRI */
.ekk-uudised-nimekiri-wrapper { flex: 1; min-width: 0; }

.ekk-uudised-nimekiri {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* KAART */
.ekk-uudis-kaart { display: block; }

.ekk-kaart-link {
    display: flex;
    align-items: stretch;
    position: relative;
    background: var(--ekk-gray-100);
    outline: 1px solid var(--ekk-gray-200);
    border-radius: var(--ekk-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    min-height: 80px;
    transition: outline-color 0.15s;
}

.ekk-kaart-link:hover { outline-color: var(--ekk-gray-300); }

/* Pilt / badge — vasak pool */
.ekk-kaart-pilt-wrapper {
    width: 100px;
    flex-shrink: 0;
    background: var(--ekk-beige-20);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.ekk-kaart-pilt {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ekk-kaart-badge {
    width: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.5px;
    text-align: center;
}

.ekk-kaart-badge.badge-uudis     { background: var(--ekk-orange-20); color: var(--ekk-orange-100); }
.ekk-kaart-badge.badge-uudiskiri { background: var(--ekk-blue-20);   color: var(--ekk-blue-100); }
.ekk-kaart-badge.badge-meedia    { background: var(--ekk-beige-20);  color: var(--ekk-text-secondary); }
.ekk-kaart-badge.badge-default   { background: var(--ekk-gray-200);  color: var(--ekk-text-tertiary); }

/* Sisu */
.ekk-kaart-sisu {
    flex: 1;
    padding: 8px 36px 8px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ekk-kaart-pealkiri {
    font-size: 18px;
    font-weight: 500;
    line-height: 28.8px;
    margin: 0;
    color: var(--ekk-text-primary);
}

.ekk-kaart-allikas {
    display: block;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: var(--ekk-text-primary);
}

.ekk-kaart-kuupaev {
    display: block;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: var(--ekk-text-secondary);
}

/* Väline ikoon */
.ekk-kaart-väline-ikoon {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    background: var(--ekk-white);
    border-top-right-radius: var(--ekk-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--ekk-text-primary);
}

/* LAADI ROHKEM */
.ekk-lehekylg-wrapper { text-align: center; margin-top: 24px; }

.ekk-rohkem-nupp {
    font-family: var(--ekk-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 28.8px;
    padding: 12px 32px;
    background: var(--ekk-orange-40);
    color: var(--ekk-text-primary);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s;
}

.ekk-rohkem-nupp:hover { background: var(--ekk-orange-100); color: var(--ekk-white); }
.ekk-rohkem-nupp:disabled { background: var(--ekk-gray-200); color: var(--ekk-text-tertiary); cursor: not-allowed; }

/* TOETA BLOKK */
.ekk-toeta-blokk {
    margin-top: 48px;
    background: var(--ekk-blue-20);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ekk-toeta-sisu { flex: 1; }

.ekk-toeta-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.ekk-toeta-ikoon { font-size: 24px; }

.ekk-toeta-pealkiri {
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    color: var(--ekk-text-primary);
}

.ekk-toeta-tekst {
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: var(--ekk-text-secondary);
    margin: 0;
}

.ekk-toeta-nupp {
    font-family: var(--ekk-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 28.8px;
    padding: 12px 32px;
    background: var(--ekk-orange-40);
    color: var(--ekk-text-primary);
    border: none;
    border-radius: 0;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
    transition: background 0.15s;
}

.ekk-toeta-nupp:hover { background: var(--ekk-orange-100); color: var(--ekk-white); }

/* DETAILVAADE */
.ekk-detail-wrapper { font-family: var(--ekk-font); width: 100%; }

.ekk-leivapuru {
    font-size: 14px;
    color: var(--ekk-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ekk-leivapuru a { color: var(--ekk-text-secondary); text-decoration: none; }
.ekk-leivapuru a:hover { color: var(--ekk-orange-100); }

.ekk-detail-hero { margin-bottom: 32px; overflow: hidden; }

.ekk-detail-hero-pilt {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.ekk-detail-layout {
    display: grid;
    grid-template-columns: 1fr 270px;
    gap: 48px;
    align-items: start;
}

@media (max-width: 900px) {
    .ekk-detail-layout { grid-template-columns: 1fr; }
}

.ekk-detail-pealkiri {
    font-size: 48px;
    font-weight: 700;
    line-height: 72px;
    margin: 0 0 16px 0;
}

.ekk-detail-joon {
    border: none;
    border-top: 1px solid var(--ekk-gray-200);
    margin: 0 0 24px 0;
}

.ekk-detail-tekst { font-size: 16px; line-height: 24px; }
.ekk-detail-tekst h2 { font-size: 24px; font-weight: 700; margin: 32px 0 12px; }
.ekk-detail-tekst h3 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; }
.ekk-detail-tekst p  { margin: 0 0 16px; }
.ekk-detail-tekst a  { color: var(--ekk-orange-100); }

.ekk-detail-välislink { margin-top: 32px; }

.ekk-detail-välislink a {
    font-size: 18px;
    font-weight: 700;
    color: var(--ekk-text-primary);
    background: var(--ekk-orange-40);
    padding: 12px 32px;
    display: inline-block;
    text-decoration: none;
    transition: background 0.15s;
}

.ekk-detail-välislink a:hover { background: var(--ekk-orange-100); color: var(--ekk-white); }

.ekk-detail-sidebar { position: sticky; top: 24px; }

/* ABI */
.ekk-laadimine, .ekk-tühi {
    text-align: center;
    padding: 40px;
    color: var(--ekk-text-tertiary);
    font-size: 14px;
}

/* MOBIIL */
@media (max-width: 600px) {
    .ekk-kaart-pilt-wrapper, .ekk-kaart-badge { width: 72px; }
    .ekk-kaart-pealkiri { font-size: 15px; line-height: 22px; }
    .ekk-detail-pealkiri { font-size: 28px; line-height: 36px; }
    .ekk-toeta-blokk { flex-direction: column; }
    .ekk-toeta-nupp { width: 100%; text-align: center; }
}
