div:has(>.separator-line)>.optional,
div:has(>.separator-line)>.woocommerce-input-wrapper
{
    display: none;
}

/* Stilovi za OTT verify dugme */
#verify-email-btn {
    padding: 15px 40px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    background-color: #0274be !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    min-width: 200px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

#verify-email-btn:hover:not(:disabled) {
    background-color: #025a9e !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    transform: translateY(-2px) !important;
}

#verify-email-btn:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

#verify-email-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* Zatamnjivanje sekcija dok se ne potvrdi OTT email */
.mtel-disabled-section {
    opacity: 0.4 !important;
    pointer-events: none !important;
    position: relative !important;
}

.mtel-disabled-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
    cursor: not-allowed;
}

.mtel-disabled-section input,
.mtel-disabled-section select,
.mtel-disabled-section textarea {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
}

/* Dodatni vizuelni indikator */
form.checkout.mtel-email-not-verified::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

/* Osiguraj da email sekcija ostane vidljiva */
.ott-email,
.ott-email .form-row,
#verify-email-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Preloader stilovi */
#mtel-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
}

.loader-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
}

.loader-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.loader-text {
    color: #333;
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Klasa za aktivni preloader */
#mtel-preloader.active {
    visibility: visible;
    opacity: 1;
}

.select2-container {
    border: 1px solid;
    padding: .3em;
}
.select2-dropdown {
    top: 0;
}
span.select2-dropdown.select2-dropdown--below {
    background: #0274be;
    top: 0;
    left: 0;
    color: white;
}

.meta-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
}

.meta-section p {
    margin: 5px 0;
}

.meta-section strong {
    display: inline-block;
    min-width: 150px;
}

/* Stilovi za kartice na thank you stranici */
.woocommerce-order-details {
    max-width: 800px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.woocommerce-order-details h3 {
    color: #333;
    font-size: 1.4em;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0274be;
}

.meta-section {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.meta-section:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.meta-section p {
    margin: 12px 0;
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.meta-section p:last-child {
    border-bottom: none;
}

.meta-section strong {
    display: inline-block;
    min-width: 200px;
    color: #666;
    font-weight: 600;
}

/* Responsive dizajn */
@media (max-width: 768px) {
    .meta-section p {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-section strong {
        margin-bottom: 5px;
    }
}

/* Dodatni stilovi za isticanje važnih informacija */
.meta-section p:has(strong:contains("Email")),
.meta-section p:has(strong:contains("JMBG")),
.meta-section p:has(strong:contains("Broj dokumenta")) {
    background-color: #f8f9fa;
    border-radius: 4px;
}
.woocommerce-customer-details{
    display: none!important;
}

/* Zatamnjivanje sekcija dok se ne potvrdi OTT email */
.mtel-disabled-section {
    opacity: 0.4 !important;
    pointer-events: none !important;
    position: relative !important;
    transition: opacity 0.3s ease !important;
}

.mtel-disabled-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 1;
    cursor: not-allowed;
    border-radius: 4px;
}

.mtel-disabled-section input,
.mtel-disabled-section select,
.mtel-disabled-section textarea,
.mtel-disabled-section label {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
    color: #999 !important;
}

/* Osiguraj da email sekcija ostane vidljiva */
.ott-email,
.ott-email .form-row,
.ott-email .woocommerce-form-row,
#verify-email-btn,
#verify-email-btn + div {
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Dodatni stil za formu kada email nije verifikovan */
form.checkout.mtel-email-not-verified {
    position: relative;
}

form.checkout.mtel-email-not-verified .mtel-disabled-section {
    filter: grayscale(30%);
}

/* Sakrij "(neobavezno)" za polje Prebivalište u Turskoj */
#mtel_residence_in_turkey_field .optional {
    display: none;
}

/* Sakrij "(neobavezno)" za polje Broj pasoša */
#mtel_passport_field .optional {
    display: none;
}

/* Sakrij "(optional)" za checkbox polje Adresa usluge kao u ličnim podacima */
#billing_different_service_address_field .optional {
    display: none;
}

/* Sakrij "(neobavezno)" za polja kada su obavezna */
#mtel_jmbg_field.validate-required .optional,
#billing_document_type_field.validate-required .optional {
    display: none !important;
}

/* Opšti stil - sakrij optional tekst za sva polja koja imaju required atribut */
.form-row.validate-required .optional,
.woocommerce-form-row.validate-required .optional {
    display: none !important;
}

/* Sakrij "(neobavezno)" za polja koja imaju required atribut u input/select elementu */
.form-row:has(input[required]) .optional,
.form-row:has(select[required]) .optional,
.form-row:has(textarea[required]) .optional,
.woocommerce-form-row:has(input[required]) .optional,
.woocommerce-form-row:has(select[required]) .optional,
.woocommerce-form-row:has(textarea[required]) .optional {
    display: none !important;
}

/* Klasa za sakrivanje polja ali zadržavanje u formi */
.mtel-hidden-field {
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Crveno označavanje neispravnih polja */
.woocommerce-invalid,
.form-row.woocommerce-invalid,
.woocommerce-form-row.woocommerce-invalid {
    border-color: #dc3545 !important;
    border-width: 2px !important;
}

.woocommerce-invalid input,
.woocommerce-invalid select,
.woocommerce-invalid textarea {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.field-error-message {
    display: block;
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 5px;
    font-weight: 500;
}

/* Disabled checkout dugme */
#place_order.mtel-disabled-checkout {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #999 !important;
}

#place_order.mtel-disabled-checkout:hover {
    background-color: #999 !important;
}

/* Service Type Indicator Styles */
.mtel-service-type-indicator {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mtel-service-type-header {
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.mtel-service-type-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mtel-service-type-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid;
}

.mtel-service-type-item.mtel-postpaid {
    border-left-color: #dc3545;
}

.mtel-service-type-item.mtel-prepaid {
    border-left-color: #28a745;
}

.mtel-service-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    text-align: center;
}

.mtel-service-type-item.mtel-postpaid .mtel-service-type-badge {
    background-color: #dc3545;
    color: #fff;
}

.mtel-service-type-item.mtel-prepaid .mtel-service-type-badge {
    background-color: #28a745;
    color: #fff;
}

.mtel-service-type-name {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

@media (max-width: 768px) {
    .mtel-service-type-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .mtel-service-type-badge {
        min-width: auto;
    }
}
