/* Wienerberger Website Exact Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0;
}

.logo {
    max-height: 50px;
    max-width: 200px;
    object-fit: contain;
}

.tab-navigation {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 40px;
}

.tab-btn {
    padding: 16px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: #d32f2f;
}

.tab-btn.active {
    color: #d32f2f;
    border-bottom: 3px solid #d32f2f;
}

.basket-count {
    display: inline-block;
    background: #d32f2f;
    color: #fff;
    border-radius: 12px;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 12px;
    margin-left: 8px;
    padding: 0 8px;
    font-weight: 700;
}

.basket-content {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
}

.main-content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    gap: 80px;
}

.form-section {
    flex: 1;
    min-width: 400px;
    padding-right: 60px;
}

.model-section {
    flex: 0 0 600px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

#canvas3d {
    width: 600px;
    height: 600px;
    border: 1px solid #e0e0e0;
    position: relative;
    background: #fafafa;
    border-radius: 4px;
}

.view-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    overflow: hidden;
}

.view-btn {
    padding: 10px 16px;
    color: #333;
    background: #fff;
    border: none;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.view-btn:last-child {
    border-right: none;
}

.view-btn:hover {
    background: #f5f5f5;
    color: #d32f2f;
}

form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-col {
    flex: 1;
}

form > div {
    background: #fff;
    padding: 0;
    border: none;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Headings used for grouped controls that were converted to divs
   (e.g. PROMJER:, IZLAZNI PRIKLJUČAK:, ULAZNI PRIKLJUČCI:) */
.group-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
input[type="text"], 
input[type="number"], 
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    background: #fff;
    font-size: 14px;
    transition: all 0.2s;
    border-radius: 4px;
    font-family: inherit;
    color: #333;
    min-height: 42px;
    line-height: 1.4;
}

#selectedFlag {
    width: 20px;
    height: 15px;
    display: inline-block;
    z-index: 2;
}

/* Fallback mapping for flag-icons classes used in the country selector */
.fi-hr { background-image: url("flags/4x3/hr.svg"); }
.fi-at { background-image: url("flags/4x3/at.svg"); }
.fi-de { background-image: url("flags/4x3/de.svg"); }
.fi-ch { background-image: url("flags/4x3/ch.svg"); }
.fi-it { background-image: url("flags/4x3/it.svg"); }
.fi-si { background-image: url("flags/4x3/si.svg"); }
.fi-rs { background-image: url("flags/4x3/rs.svg"); }
.fi-me { background-image: url("flags/4x3/me.svg"); }
.fi-ba { background-image: url("flags/4x3/ba.svg"); }
.fi-fr { background-image: url("flags/4x3/fr.svg"); }
.fi-gb { background-image: url("flags/4x3/gb.svg"); }
.fi-nl { background-image: url("flags/4x3/nl.svg"); }
.fi-be { background-image: url("flags/4x3/be.svg"); }
.fi-es { background-image: url("flags/4x3/es.svg"); }
.fi-pt { background-image: url("flags/4x3/pt.svg"); }
.fi-pl { background-image: url("flags/4x3/pl.svg"); }
.fi-cz { background-image: url("flags/4x3/cz.svg"); }
.fi-sk { background-image: url("flags/4x3/sk.svg"); }
.fi-hu { background-image: url("flags/4x3/hu.svg"); }
.fi-ro { background-image: url("flags/4x3/ro.svg"); }
.fi-bg { background-image: url("flags/4x3/bg.svg"); }
.fi-gr { background-image: url("flags/4x3/gr.svg"); }
.fi-dk { background-image: url("flags/4x3/dk.svg"); }
.fi-se { background-image: url("flags/4x3/se.svg"); }
.fi-no { background-image: url("flags/4x3/no.svg"); }
.fi-fi { background-image: url("flags/4x3/fi.svg"); }


.short-input {
    max-width: 200px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #d32f2f;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #d32f2f;
}

input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #d32f2f;
}

button[type="submit"], 
button[type="button"] {
    padding: 14px 32px;
    background: #d32f2f;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s;
    border-radius: 4px;
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
}

button[type="submit"]:hover, 
button[type="button"]:hover {
    background: #b71c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

button[type="button"]#clearFormBtn {
    background: #757575;
}

button[type="button"]#clearFormBtn:hover {
    background: #616161;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.diameter-options label {
    display: inline-block;
    margin-right: 24px;
    margin-bottom: 12px;
    font-weight: 400;
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

#slivnik-diameters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 12px;
}

#slivnik-diameters label {
    display: flex;
    align-items: center;
    margin: 0;
}

.diameter-options input[type="radio"] {
    margin-right: 8px;
}

.radio-group {
    display: flex;
    gap: 24px;
    margin: 10px 0;
}

.inlet-extra {
    display: none;
    margin-top: 10px;
}

.inlet-extra label {
    margin-right: 10px;
}

h2 {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

h3 {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

h4 {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

a {
    color: #d32f2f;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #b71c1c;
    text-decoration: underline;
}

/* Modal styles matching page design */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
    padding: 40px 16px;
    font-family: inherit;
}

.modal-content {
    background: #fff;
    margin: 40px auto;
    padding: 32px 36px;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-title {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal-body {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 12px;
    line-height: 1.8;
    color: #333;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-actions {
    margin-top: 20px;
}

#acceptTerms {
    background: #d32f2f;
    font-weight: 700;
}

#acceptTerms:hover {
    background: #b71c1c;
}

/* Basket/Order list styles */
#orderList > div {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#orderList button {
    border-radius: 4px;
    font-weight: 600;
    padding: 8px 20px;
    font-size: 14px;
}

#submitOrderBtn {
    background: #d32f2f;
    font-weight: 700;
    font-size: 16px;
}

#submitOrderBtn:hover {
    background: #b71c1c;
}

/* Validation styles */
.field-error {
    outline: none !important;
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 6px rgba(211, 47, 47, 0.12) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    animation: field-pulse 0.9s ease-in-out;
}

@keyframes field-pulse {
    0% { box-shadow: 0 0 0 0 rgba(211,47,47,0.15); }
    50% { box-shadow: 0 0 0 10px rgba(211,47,47,0.06); }
    100% { box-shadow: 0 0 0 0 rgba(211,47,47,0); }
}

/* Tangencijalno disclaimer styling (moved from inline in index.html) */
#tangDisclaimer {
    display: none;
    margin-bottom: 8px;
    padding: 10px;
    background: #fff3f3;
    border-left: 4px solid #d32f2f;
    color: #a94442;
    border-radius: 2px;
    font-size: 14px;
}

/* Temporary brief message shown below the main disclaimer */
#tangTempMsg {
    display: none;
    margin-top: 6px;
    margin-bottom: 8px;
    padding: 8px;
    background: #fff8e6;
    border-left: 4px solid #f0ad4e;
    color: #7a4a00;
    border-radius: 2px;
    font-size: 13px;
}

#validationMessage {
    display: none;
    background: #fff3f3;
    border-left: 4px solid #d32f2f;
    color: #a10f0f;
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    font-weight: 600;
}

#validationMessage button.close-msg {
    float: right;
    background: transparent;
    border: none;
    font-size: 16px;
    color: #a10f0f;
    cursor: pointer;
}

.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    max-width: 520px;
    padding: 14px 18px;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #d32f2f;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    font-size: 14px;
    font-weight: 600;
    white-space: pre-wrap;
    opacity: 0;
    transform: translate(-50%, -10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2000;
}

.toast.toast-info {
    border-left-color: #d32f2f;
}

.toast.toast-success {
    border-left-color: #2e7d32;
}

.toast.toast-error {
    border-left-color: #c62828;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}