/*
Theme Name: Perfect Protein Custom Editorial
Theme URI: https://perfectprotein.ee
Author: Sven-Erik Andresen
Description: Bespoke dark-themed editorial WordPress/WooCommerce theme for Perfect Protein.
Version: 1.0.0
Text Domain: perfect-protein
*/

:root {
  --bg-dark: #021214;
  --card-dark: #031a1d;
  --accent-orange: #ff6136;
  --accent-green: #a4e460;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --border-glow: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Instrument Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   OSTUKORVI STIILID (TUME TEEMA)
   ========================================== */
body.woocommerce-cart {
    background-color: #021214;
    color: #ffffff;
}

.wp-block-woocommerce-cart,
.woocommerce-cart-form,
.woocommerce-cart .entry-content,
main.site-main {
    margin-top: 60px;
    padding-top: 20px;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .wp-block-woocommerce-cart,
    .woocommerce-cart-form,
    main.site-main {
        margin-top: 30px;
    }
}

.wc-block-cart-items__row,
.woocommerce-cart table.cart tr.cart_item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
}

.wc-block-components-product-image,
.wc-block-components-product-image img,
.woocommerce-cart table.cart img {
    width: 105px;
    height: 105px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    object-fit: cover;
}

.wc-block-components-product-name,
.woocommerce-cart table.cart a:not(.button) {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-transform: uppercase;
    text-decoration: none;
}

.wc-block-components-product-name:hover {
    color: #a4e460;
}

.wc-block-components-product-metadata,
.wc-block-cart-items__row .wc-block-components-product-metadata {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
}

.wc-block-components-product-price,
.wc-block-cart-items__row .amount {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
}

.wc-block-components-sale-badge,
span[class*="saasta"],
.save-price {
    background: rgba(164, 228, 96, 0.15);
    color: #a4e460;
    border: 1px solid rgba(164, 228, 96, 0.4);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 900;
}

.wc-block-components-quantity-selector {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 2px;
}

.wc-block-components-quantity-selector input,
.wc-block-components-quantity-selector button {
    color: #ffffff;
    font-weight: 800;
    background: transparent;
}

.wc-block-cart__sidebar,
.cart_totals {
    background: #031a1d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.wc-block-components-totals-wrapper,
.wc-block-cart__totals-title,
.wc-block-components-panel,
.wc-block-components-panel__button {
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
    padding-left: 0;
    padding-right: 0;
}

.wc-block-components-totals-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    padding-top: 14px;
    padding-bottom: 14px;
}

.wc-block-cart__totals-title,
.cart_totals h2 {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #ffffff;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 12px;
}

.wc-block-components-totals-footer-item {
    border-top: none;
    border-bottom: none;
    padding-top: 16px;
    padding-bottom: 0;
}

.wc-block-components-totals-footer-item,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
}

.wc-block-cart__sidebar hr,
.wc-block-components-totals-wrapper hr {
    display: none;
}

.wc-block-cart__submit-button,
.checkout-button,
button[type="submit"].wc-block-cart__submit-button {
    background: #ff6136;
    color: #ffffff;
    border: none;
    border-radius: 35px;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 12px 30px rgba(255, 97, 54, 0.4);
    margin-top: 24px;
    width: 100%;
    transition: all 0.25s ease;
}

.wc-block-cart__submit-button:hover,
.checkout-button:hover {
    background: #e0542e;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(255, 97, 54, 0.55);
}

/* ======================================================
   KASSA LEHE KOGU DISAIN (HELE JA PUHAS)
   ====================================================== */

/* --- TEEB KOGU KASSA LEHE TAUSTA VALGEKS --- */
body.woocommerce-checkout {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* --- 1. KASSA PEAMINE KONTEINER JA PEALKIRJAD --- */
html body.woocommerce-checkout .wp-block-woocommerce-checkout {
    background-color: #ffffff !important;
    padding: 40px !important;
    border-radius: 8px !important;
    color: #333333 !important;
}

html body.woocommerce-checkout .wp-block-woocommerce-checkout h1,
html body.woocommerce-checkout .wp-block-woocommerce-checkout h2,
html body.woocommerce-checkout .wp-block-woocommerce-checkout h3 {
    color: #050b0c !important;
}

/* --- 2. TARNEVALIKU LÜLITI (Kuller / Tulen ise) --- */
html body.woocommerce-checkout .wc-block-components-segmented-control {
    background-color: #f0f2f5 !important; 
}
html body.woocommerce-checkout .wc-block-components-segmented-control button,
html body.woocommerce-checkout .wc-block-components-segmented-control button span,
html body.woocommerce-checkout .wc-block-components-segmented-control button svg {
    color: #333333 !important;
    fill: #333333 !important;
}
html body.woocommerce-checkout .wc-block-components-segmented-control button.is-active span,
html body.woocommerce-checkout .wc-block-components-segmented-control button[aria-selected="true"] span,
html body.woocommerce-checkout .wc-block-components-segmented-control button[aria-selected="true"] svg {
    color: #000000 !important;
    fill: #000000 !important;
    font-weight: 600 !important;
}

/* --- 3. TOOTED JA TELLIMUSE KOKKUVÕTE --- */
/* Peidame pikad tootekirjeldused */
html body.woocommerce-checkout .wc-block-components-product-details__description,
html body.woocommerce-checkout .wc-block-components-product-metadata__description {
    display: none !important;
}

/* Hinnad ja tekstid tumedaks heledal taustal */
html body.woocommerce-checkout .wc-block-components-totals-item,
html body.woocommerce-checkout .wc-block-components-totals-item__value,
html body.woocommerce-checkout .wc-block-components-product-name,
html body.woocommerce-checkout .wc-block-components-order-summary-item .wc-block-components-product-price,
html body.woocommerce-checkout .wc-block-components-order-summary-item .wc-block-components-product-price span,
html body.woocommerce-checkout .wc-block-components-order-summary-item .wc-block-components-product-price del {
    color: #333333 !important;
}

/* Koguse märk pildil (Brändi oranž) */
html body.woocommerce-checkout .wc-block-components-product-badge,
html body.woocommerce-checkout .wc-block-components-order-summary-item__quantity {
    background-color: #ff6136 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}
html body.woocommerce-checkout .wc-block-components-product-badge *,
html body.woocommerce-checkout .wc-block-components-order-summary-item__quantity * {
    color: #ffffff !important;
}

/* "Säästa" märgis - parandatud ja silmatorkav */
html body.woocommerce-checkout .wc-block-components-sale-badge,
html body.woocommerce-checkout .wc-block-components-badge {
    background-color: #a4e460 !important; 
    color: #050b0c !important; 
    border: 1px solid #8bc04f !important;
    font-weight: 800 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
}
html body.woocommerce-checkout .wc-block-components-sale-badge *,
html body.woocommerce-checkout .wc-block-components-badge * {
    color: #050b0c !important; 
}

/* --- 4. ARVUTIVAATE KOHANDUSED (Fondisuurused) --- */
@media screen and (min-width: 900px) {
    html body.woocommerce-checkout .wc-block-components-product-name {
        font-size: 12px !important;
    }
    html body.woocommerce-checkout .wc-block-components-order-summary-item .wc-block-components-product-price {
        font-size: 13px !important;
    }
    html body.woocommerce-checkout .wc-block-components-product-price span,
    html body.woocommerce-checkout .wc-block-components-product-price del {
        font-size: 11px !important;
    }
    html body.woocommerce-checkout .wc-block-components-sale-badge,
    html body.woocommerce-checkout .wc-block-components-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}

/* --- 5. MAKSEVIISIDE JA TRANSPORDI OPTIMEERIMINE --- */
/* Transpordi ja makseviisi raamid ning aktiivne olek */
html body.woocommerce-checkout .wc-block-checkout__shipping-option,
html body.woocommerce-checkout .wc-block-components-radio-control-accordion-option {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

/* Aktiivne (valitud) transpordi või makseviisi kast */
html body.woocommerce-checkout .wc-block-checkout__shipping-option--selected,
html body.woocommerce-checkout .wc-block-components-radio-control-accordion-option--selected,
html body.woocommerce-checkout .wc-block-components-radio-control__option:checked {
    border-color: #ff6136 !important; /* Brändi oranž raam */
    background-color: rgba(255, 97, 54, 0.03) !important; /* Hõrn oranž taust */
}

/* Raadionupud (täpid) brändi värvi */
html body.woocommerce-checkout input[type="radio"]:checked {
    accent-color: #ff6136 !important;
}

/* Montonio / Apple Pay lilla tausta neutraliseerimine */
html body.woocommerce-checkout .wc-block-components-radio-control-accordion-content {
    background-color: #f9f9f9 !important;
    border-radius: 0 0 8px 8px !important;
}

/* --- 6. ESITA TELLIMUS NUPP (Brändi oranž) --- */
html body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
    background-color: #ff6136 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 35px !important;
    padding: 20px 24px !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    box-shadow: 0 12px 30px rgba(255, 97, 54, 0.4) !important;
    transition: all 0.25s ease !important;
}

html body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
    background-color: #e0542e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 36px rgba(255, 97, 54, 0.55) !important;
}

/* 1. PEIDAME HONEYPOT PÜÜDURVÄLJA TÄIELIKULT */
.pp-hidden-hp,
.pp-hidden-hp input {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: -1 !important;
}

/* 2. STIILIME KONTROLLKÜSIMUSE (QUIZ) PUNTI */
.pp-quiz-wrapper {
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Küsimuse tekst (Mitu on 3 + 2?) */
.pp-quiz-wrapper .wpcf7-quiz-label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #031a1d; /* Tume tekst laimirohelisel taustal */
    margin-bottom: 8px;
}

/* Sisendkast vastuse jaoks */
.pp-quiz-wrapper input.wpcf7-quiz {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #031a1d !important;
    color: #031a1d !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    padding: 8px 0 !important;
    width: 100px !important; /* Hoiame kasti kompaktse */
    outline: none !important;
}

.pp-quiz-wrapper input.wpcf7-quiz:focus {
    border-bottom-color: #ff6136 !important; /* Fookuses muutub oranžiks */
}

/* ======================================================
   TELLIMUS TÄIDETUD (THANK YOU) - TSENTREERITUD JA LAI VAADE
   ====================================================== */

/* 1. PEAMINE TSENTREERITUD KONTEINER */
body.woocommerce-order-received {
    background-color: #021214 !important;
    color: #ffffff !important;
}

body.woocommerce-order-received .site-main,
body.woocommerce-order-received .woocommerce,
body.woocommerce-order-received .entry-content,
body.woocommerce-order-received article {
    max-width: 1100px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 150px !important;
    padding-bottom: 100px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* 2. SAKKIDE JA SIFRITE LAIUSE SUNDIMINE 100% PEALE */
body.woocommerce-order-received .woocommerce-order,
body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details,
body.woocommerce-order-received .woocommerce-order-overview {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
}

/* 3. TEAVITUS JA ÜLEMINE KOKKUVÕTE */
body.woocommerce-order-received .woocommerce-notice--success,
body.woocommerce-order-received .woocommerce-thankyou-order-received {
    background: rgba(164, 228, 96, 0.1) !important;
    border: 1px solid #a4e460 !important;
    color: #a4e460 !important;
    padding: 20px 30px !important;
    border-radius: 16px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    list-style: none !important;
    width: 100% !important;
}

body.woocommerce-order-received ul.woocommerce-order-overview {
    background: #031a1d !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 24px 30px !important;
    list-style: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px 30px !important;
    margin-bottom: 40px !important;
}

body.woocommerce-order-received ul.woocommerce-order-overview li {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-right: 20px !important;
    margin: 0 !important;
    flex: 1 1 auto !important;
    min-width: 130px !important;
    word-break: break-word !important;
}

body.woocommerce-order-received ul.woocommerce-order-overview li:last-child {
    border-right: none !important;
    padding-right: 0 !important;
}

body.woocommerce-order-received ul.woocommerce-order-overview li strong {
    display: block !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-top: 6px !important;
    text-transform: none !important;
}

/* 4. PEALKIRJAD & TOOTE TABEL */
body.woocommerce-order-received h2,
body.woocommerce-order-received h3,
body.woocommerce-order-received .woocommerce-order-details__title,
body.woocommerce-order-received .woocommerce-column__title {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.01em !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
}

body.woocommerce-order-received table.order_details {
    width: 100% !important;
    background: #031a1d !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    margin-bottom: 40px !important;
}

body.woocommerce-order-received table.order_details th,
body.woocommerce-order-received table.order_details td {
    padding: 18px 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

body.woocommerce-order-received table.order_details thead th {
    font-size: 12px !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 800 !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

body.woocommerce-order-received table.order_details td a {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

body.woocommerce-order-received table.order_details tfoot th {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600 !important;
    text-align: left !important;
}

body.woocommerce-order-received table.order_details tfoot td {
    font-weight: 800 !important;
    text-align: right !important;
}

body.woocommerce-order-received table.order_details tfoot tr:last-child th,
body.woocommerce-order-received table.order_details tfoot tr:last-child td {
    border-bottom: none !important;
    font-size: 18px !important;
    color: #a4e460 !important;
}

/* 5. AADRESSID KÕRVUTI KAHES VÕRDSES KAARDIS */
body.woocommerce-order-received .woocommerce-customer-details,
body.woocommerce-order-received .woocommerce-columns--addresses {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    width: 100% !important;
    margin-top: 20px !important;
}

body.woocommerce-order-received .woocommerce-column,
body.woocommerce-order-received .woocommerce-column--billing-address,
body.woocommerce-order-received .woocommerce-column--shipping-address {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

body.woocommerce-order-received address {
    background: #031a1d !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 24px !important;
    font-style: normal !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* MOBIILIS ÜKSTEISE ALLA */
@media (max-width: 768px) {
    body.woocommerce-order-received .woocommerce-customer-details,
    body.woocommerce-order-received .woocommerce-columns--addresses {
        grid-template-columns: 1fr !important;
    }
}