/* Wrapper stilovi */
.form-wrapper,
.wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px; /* Dodaj padding da forma ne bude zalepljena za rubove */
    box-sizing: border-box;
    background-color: transparent;
	margin-bottom: 50px;
}

.wrap {
    padding: 0px; /* Dodaj padding da forma ne bude zalepljena za rubove */
}

/* Forma */
div.wrap form,
div.form-wrapper form {
    background-color: #262728;
    color: #ffffff;
    width: 100%;
    max-width: 800px; /* Maksimalna širina forme */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
}

div#edit-modal-player,
div#edit-modal-racket,
div#edit-modal-string {
    background-color: #262728;
    color: #ffffff;
    width: calc(100% - 32px); /* ⭐ 16px levo + 16px desno */
    max-width: 500px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
	margin-top: 10px;
}

form#edit-form-player h2,
form#edit-form-racket h2,
form#edit-form h2 {
	color: #ffffff;
}

/* Stil za tabelu unutar forme */
form .form-table {
    width: 100%;
    border-collapse: collapse;
}

/* Stil za redove i ćelije */
form .form-table th, 
form .form-table td {
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

/* Stil za oznake (labels) */
form .form-table th {
    font-weight: unset;
    color: #ffffff;
	width: 300px
}

/* Stil za input polja */
input#trsm_stringing_price,
select#payment_method,
input#amount,
input#player_search,
input#player_id,
select#stringing_method,
input#string_id,
input#main_string_id,
input#cross_string_id,
input#players_string,
input#main_players_string,
input#cross_players_string,
input#racket_id,
select#rackets_count,
input#main_strings_tension,
input#cross_strings_tension,
input#main_strings_length,
input#cross_strings_length,
input#one_piece_strings_length,
textarea#details,
input#full_name_players,
input#nick_name_players,
input#email_players,
input#phone_players,
select#gender_players,
textarea#notes_players,
input#full_name_rackets,
input#brand_rackets,
input#model_rackets,
input#head_size_rackets,
input#main_strings_rackets,
input#cross_strings_rackets,
input#full_name_strings,
input#brand_strings,
input#model_strings,
input#gauge_strings,
select#type_strings,
input#total_length_strings,
input#stringing_price,
input#string_price,
.edit-modal input,
.edit-modal textarea,
.edit-modal select {
    width: 100%; /* Širina polja */
    max-width: 100%; /* Osigurava da ne prelazi granice forme */
    background-color: #181818 !important;
    color: #ffffff !important;
    border: 1px solid #444444 !important;
    border-radius: 4px !important;
    padding: 8px 10px;
    font-size: 14px !important;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
	margin-bottom: 0px !important;
}

/* Fokus efekat za input polja */
input#trsm_stringing_price:focus,
select#payment_method:focus,
input#amount:focus,
input#player_search:focus,
input#player_id:focus,
select#stringing_method:focus,
input#string_id:focus,
input#main_string_id:focus,
input#cross_string_id:focus,
input#main_players_string:focus,
input#cross_players_string:focus,
input#racket_id:focus,
select#rackets_count:focus,
input#main_strings_tension:focus,
input#cross_strings_tension:focus,
input#main_strings_length:focus,
input#cross_strings_length:focus,
input#one_piece_strings_length:focus,
textarea#details:focus,
input#full_name_players:focus,
input#nick_name_players:focus,
input#email_players:focus,
input#phone_players:focus,
select#gender_players:focus,
textarea#notes_players:focus,
input#full_name_rackets:focus,
input#brand_rackets:focus,
input#model_rackets:focus,
input#head_size_rackets:focus,
input#main_strings_rackets:focus,
input#cross_strings_rackets:focus,
input#full_name_strings:focus,
input#brand_strings:focus,
input#model_strings:focus,
input#gauge_strings:focus,
select#type_strings:focus,
input#total_length_strings:focus,
input#stringing_price:focus,
input#string_price:focus,
.edit-modal input:focus,
.edit-modal textarea:focus,
.edit-modal select:focus {
    border-color: #ff0100 !important;
    box-shadow: 0 0 5px #ff0100 !important;
}

.dataTables_filter label input:focus {
    border-color: #ff0100 !important;
    box-shadow: 0 0 5px #ff0100 !important;
}
.dataTables_length label select option {
  background-color: #303030 !important;

}

/* Stil za dugme */
#edit-modal button {
    width: 100%;
    max-width: 100%;
}

/* Responsive prilagođavanje */
@media (max-width: 768px) {

    form .form-table th, 
    form .form-table td {
        display: block;
        width: 100%;
        text-align: left;
		max-width: -moz-available;
        padding: 10px 0;
    }

    form .form-table th {
         padding-bottom: 0;
		 font-size: 15px;
    }
	
    form .form-table td {
         padding-top: 0;
		 font-size: 14px;
    }

    form input[type="text"],
    form select,
    form button {
        width: 100%; /* Maksimalna širina za mobilne uređaje */
    }
	


	
    div#edit-modal {
        width: 90%; /* Manja širina za mobilne uređaje */
        max-width: 400px !important;
        max-height: 80vh; /* Ograničava visinu na 80% ekrana */
    }
}


/* Wrapper za autocomplete */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px; /* Ili širina tvoje forme */
}

/* Lista opcija */
.autocomplete-list {
    position: absolute;
    top: 100%; /* Pozicioniranje ispod inputa */
    left: 0;
    width: 100%;
    max-height: 200px;
    background-color: #181818 !important;
    border: 1px solid #444444;
    border-radius: 4px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Stil za pojedinačne opcije */
.autocomplete-list li {
    padding: 10px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Hover efekat */
.ui-widget-content li:hover {
    background-color: #ff0100 !important;
    color: #ffffff !important;
}

#player_search {
  width: 280px;
  display: block;
}

.ui-widget.ui-widget-content {
  border: 1px solid #ff0100 !important;
}
.ui-widget-content {
  background: #333 !important;
color: #fff !important;}
  
  
.ui-menu-item-wrapper:hover{    background-color: #414550 !important;
    color: #ffffff !important; border: 1px solid #ff0100 !important;}

/* CSS za datatables responsive */	
@media screen and (max-width: 768px) {
    #history-table {
        width: 100% !important;
    }
    .dataTables_wrapper {
        overflow-x: auto;
    }
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before, 
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
  margin-right: .5em;
  display: inline-block;
  color: rgb(255, 1, 0) !important;
  content: "►";
}

@media screen and (max-width: 640px) {
  .dataTables_wrapper .dataTables_filter {
    margin-bottom: 20px;
  }
}	
/* Kraj CSS-a za datatables responsive */		

input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: none;
}

input#use_own_string[type="checkbox"]:focus,
input#use_own_string_half_cross[type="checkbox"]:focus,
input#use_own_string_half_main[type="checkbox"]:focus,
input#send_email_player[type="checkbox"]:focus {
    outline: none;
	border-color: #ff0100;
    box-shadow: 0 0 5px #ff0100; /* Postavlja novu boju oko checkbox-a */
}

input#use_own_string[type="checkbox"],
input#use_own_string_half_cross[type="checkbox"],
input#use_own_string_half_main[type="checkbox"],
input#send_email_player[type="checkbox"] {
    appearance: none;
    width: 23px;
    height: 23px;
    border: 1px solid #444444;
	background-color: #181818;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
	top: 4px;
}

input#use_own_string[type="checkbox"]:checked,
input#use_own_string_half_cross[type="checkbox"]:checked,
input#use_own_string_half_main[type="checkbox"]:checked,
input#send_email_player[type="checkbox"]:checked {
    background-color: red; /* Menja boju pozadine checkbox-a */
    border-color: red;
}

input#use_own_string[type="checkbox"]::before,
input#use_own_string_half_cross[type="checkbox"]::before,
input#use_own_string_half_main[type="checkbox"]::before,
input#send_email_player[type="checkbox"]::before {
    content: '✔';
    font-size: 16px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

input#use_own_string[type="checkbox"]:checked::before,
input#use_own_string_half_cross[type="checkbox"]:checked::before,
input#use_own_string_half_main[type="checkbox"]:checked::before,
input#send_email_player[type="checkbox"]:checked::before {
    display: block; /* Prikazuje checkmark */
}

@media screen and (max-width: 768px) {
input[type="checkbox"] {
    top: 6px;
}
}


/************ TABOVI POCETAK **************/
.trsm-tab-links-add,
.trsm-tab-links-subtabs,
.trsm-tab-links-edit,
.trsm-tab-links-history {
    list-style: none !important;
    padding: 0;
    margin: 0 0 40px 0 !important;
    display: flex;
    overflow-x: auto;              /* Omogućava horizontalno skrolovanje */
    gap: 10px;                     /* Razmak između tabova */
    scrollbar-width: none;         /* Firefox – sakrij scrollbar */
    -ms-overflow-style: none;      /* IE/Edge – sakrij scrollbar */
    -webkit-overflow-scrolling: touch; /* Glatko skrolovanje na iOS */
    justify-content: center; 
    padding-bottom: 10px;          /* Mali padding da ne "seče" donji deo */
}

@media (max-width: 700px) {
    .trsm-tab-links-add {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .trsm-tab-links-edit {
        justify-content: flex-start;
    }
}

.trsm-tab-links-add a,
.trsm-tab-links-subtabs a,
.trsm-tab-links-edit a,
.trsm-tab-links-history a {
    display: block;
    padding: 12px 20px;
    background-color: #262728;
    color: #ffffff;
    border: 4px solid #464646;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0px;
}

/* 📱 Tablet & mobile */
@media (max-width: 850px) {
    .trsm-tab-links-add a,
    .trsm-tab-links-subtabs a,
    .trsm-tab-links-edit a,
    .trsm-tab-links-history a {
        padding: 10px 15px;
		font-size: 0.95rem;
    }
}

/* Responsive tabovi – kombinacija tvojih stilova */
.trsm-tabs {
    margin-top: 30px;
}

/* Sakrij scrollbar u WebKit pregledačima (Chrome, Safari) */
.trsm-tab-links::-webkit-scrollbar {
    display: none;
}

/* Pojedinačni tab */
.trsm-tab-links li {
    margin: 0;
    flex-shrink: 0; /* Sprečava sabijanje tabova */
	background-color: #262728;
}

/* Hover efekat */
.trsm-tab-links a:hover {
    background-color: #414550;
    border: 4px solid #ff0100;
    color: #ffffff;
}

/* Aktivan tab */
.trsm-tab-links li.active a {
    background-color: #262728;
    border: 4px solid #ff0100;
    color: #ffffff;
}

/* Sadržaj tabova */
.trsm-tab-content {
    display: none;
}

.trsm-tab-content.active {
    display: block;
}

/* Desktop: centriraj tabove i ukloni skrolovanje */
@media (min-width: 768px) {
    .trsm-tab-links {
        overflow-x: visible; 
    }
}




.trsm-sub-tabs {
    margin-top: -20px;
}

.trsm-sub-tabs .trsm-tab-links {
    margin-bottom: 20px !important;
    gap: 15px;
    justify-content: center;
}


@media (min-width: 768px) {
    .trsm-sub-tabs .trsm-tab-links {
        justify-content: center;
    }
}
	
/************ TABOVI KRAJ **************/	
	
	
	
	

    /* Stilovi za sve tabele (Stringing + Matching) */
    #all-stringing-table,
    #matching-history-table,
    #all-matching-history-table {
        border-collapse: collapse;
        width: 100% !important;
    }

    #all-stringing-table th,
    #matching-history-table th,
    #all-matching-history-table th,
    #all-stringing-table td,
    #matching-history-table td,
    #all-matching-history-table td {
        border: 1px solid #ccc;
        padding: 10px 5px 10px 5px;
        text-align: center;
    }

    #all-stringing-table th,
    #matching-history-table th,
    #all-matching-history-table th {
        background-color: #222222;
        color: #fff;
        text-align: center;
    }

    #all-stringing-table td,
    #matching-history-table td,
    #all-matching-history-table td {
        font-size: 14px;
    }

    /* Strelice za sortiranje u DataTables */
    #all-stringing-table th.sorting::before,
    #all-stringing-table th.sorting::after,
    #matching-history-table th.sorting::before,
    #matching-history-table th.sorting::after,
    #all-matching-history-table th.sorting::before,
    #all-matching-history-table th.sorting::after {
        color: #ccc;
    }

    #all-stringing-table th.sorting_asc::before,
    #all-stringing-table th.sorting_desc::after,
    #matching-history-table th.sorting_asc::before,
    #matching-history-table th.sorting_desc::after,
    #all-matching-history-table th.sorting_asc::before,
    #all-matching-history-table th.sorting_desc::after {
        color: #fff !important;
        opacity: 1;
    }

    /* DataTables kontrole */

    .dataTables_wrapper .dataTables_length {
        margin-bottom: 20px;
    }
    .dataTables_wrapper {
        margin-top: 20px;
    }	
	.dataTables_wrapper .dataTables_length select {
        background-color: #303030 !important;
        color: #fff !important;
        border: 1px solid #aaa !important;
        border-radius: 4px !important;
        padding: 5px 8px !important;
        min-width: 60px;
    }
	
	.dataTables_wrapper .dataTables_length select:focus {
        outline: none !important;
        border-color: #ff0100 !important;
        box-shadow: 0 0 5px #ff0100 !important;
    }
    	
    table.dataTable td,
    table.dataTable th {
        white-space: nowrap !important;          /* tekst ne prelazi u novi red */
        overflow: hidden !important;             /* skrati ako je predugačak */
        text-overflow: ellipsis !important;      /* dodaje tri tačke ... ako je predugačak */
        /*max-width: 200px;*/                        /* opcionalno – ograniči širinu ćelije */
    }	
	
   table.dataTable tbody th, 
   table.dataTable tbody td {
   padding: 5px 10px 5px 5px !important;
   }
	
	
	
	
	
	
	
	
	
#loading-indicator,
#matching-details-loading {
    display: none; /* podrazumevano sakriveno */
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#loading-indicator.visible,
#matching-details-loading.visible {
    display: flex !important; /* forsiraj flex */
}

#loading-indicator .loading-overlay-bg,
#matching-details-loading .loading-overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

#loading-indicator .loading-content,
#matching-details-loading .loading-content {
    background: #242425;
    border: 4px solid #ff0100;
    padding: 40px 50px;
    border-radius: 0;
    text-align: center;
    color: #ff0100;
    font-weight: bold;
    font-size: 18px;
    min-width: 320px;
    box-shadow: 0 0 30px rgba(255,1,0,0.4);
    z-index: 1001;
    pointer-events: auto;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #ff0100;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
	#loading-indicator .loading-content,
    #matching-details-loading .loading-content {
    min-width: 220px;
    }
}







/* Popravka centriranja samo za #matching-details-loading */
#matching-details-loading {
    display: none;                    /* ovo već imaš */
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.65) !important;  /* jača pozadina ako želiš */
}

/* Osiguraj da content bude centriran čak i ako flex nije aktivan na svim instancama */
#matching-details-loading .loading-content {
    margin: auto !important;          /* fallback za stare browsere ili ako flex zakaže */
    transform: translate(-50%, -50%) !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
}

/* Povećaj z-index samo za ovu instancu (da bude iznad modala) */
#matching-details-loading {
    z-index: 10001 !important;
}

/* Mobilna prilagodba (ako treba) */
@media (max-width: 768px) {
    #matching-details-loading .loading-content {
        min-width: 280px !important;
        padding: 35px 40px !important;
    }
}











/* Podešavanje za price settings tab – redosled i raspored */
/* Glavni kontejner za price settings – centriran i fiksne širine */
.form-wrapper.column-layout {
    flex-direction: column;
    align-items: center;
    gap: 30px; /* razmak između kartica */
}

.price-display-card,
.price-edit-card {
    background-color: #262728;
    color: #ffffff;
    padding: 20px;
	margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 800px;
}

.price-display-card h2,
.price-edit-card h2 {
    margin-top: 0;
    color: #ffffff;
}












#history-table-stringing,
#strings-table-frontend,
#rackets-table-frontend,
#players-table-frontend {
    border-collapse: collapse;
    width: 100% !important;
}

#history-table-stringing th, #history-table-stringing td,
#strings-table-frontend th, #strings-table-frontend td,
#rackets-table-frontend th, #rackets-table-frontend td,
#players-table-frontend th, #players-table-frontend td {
        border: 1px solid #ccc;
        padding: 10px 5px 10px 5px;
        text-align: center;
}

#history-table-stringing th,
#strings-table-frontend th,
#rackets-table-frontend th,
#players-table-frontend th {
    background-color: #222222;
	color: #fff;
    text-align: center;
}


#history-table-stringing td,
#strings-table-frontend td,
#rackets-table-frontend td,
#players-table-frontend td {
    font-size: 14px;
}

/*#history-table-stringing tr,
#strings-table-frontend tr,
#rackets-table-frontend tr,
#players-table-frontend tr {
    border-bottom: 1px solid #ddd;
}*/

	


#history-table-stringing th.sorting::before,
#history-table-stringing th.sorting::after,		
#strings-table-frontend th.sorting::before,
#strings-table-frontend th.sorting::after,
#rackets-table-frontend th.sorting::before,
#rackets-table-frontend th.sorting::after,		
#players-table-frontend th.sorting::before,
#players-table-frontend th.sorting::after {
    color: #ccc; /* Postavi osnovnu boju za strelice */
}

#history-table-stringing th.sorting_asc::before,
#history-table-stringing th.sorting_desc::after,
#strings-table-frontend th.sorting_asc::before,
#strings-table-frontend th.sorting_desc::after,
#rackets-table-frontend th.sorting_asc::before,
#rackets-table-frontend th.sorting_desc::after,        
#players-table-frontend th.sorting_asc::before,
#players-table-frontend th.sorting_desc::after {
    color: #fff; /* Postavi boju za aktivne strelice */
	opacity: 1;
}

/*.dataTables_length select {
    width: 55px;
 }
 
.dataTables_wrapper .dataTables_length {
    margin-bottom: 20px;
}

.dataTables_wrapper {
    margin-top: 20px;
}*/






/* Centriranje celog autentikacionog ekrana u sredinu stranice */
.trsm-tml-form-wrap {
    min-height: 100vh;                    /* puna visina ekrana */
    display: flex;
    justify-content: center;              /* horizontalno centriranje */
    align-items: center;                  /* vertikalno centriranje */
    padding: 20px;                        /* mali razmak sa ivica na mobilnom */
    box-sizing: border-box;
}

/* Kontejner sa dugmadima i formama – ograničena širina */
.trsm-tml-container {
    width: 100%;
    max-width: 500px;                     /* optimalna širina za forme */
	display: block;
	align-items: center;
}

/* Početni ekran sa dugmadima */
#initial-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Dugmad – veći razmak i stil */
.trsm-tml-initial-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;                            /* razmak između dugmadi */
    width: 100%;
    margin-top: 30px;
	align-items: center;
}

.trsm-wide-button {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
}

/* Dinamičke forme – isti stil kao početni ekran */
#tml-dynamic-form .tml-form-content {
    margin-top: 20px;
}

/* Back link */
.trsm-tml-back-link-container {
    display: none;
    text-align: center;
    margin-top: 20px;
}



/* Stil za titlove add formi */
.trsm-title {
  display: inline-block;
  position: relative;
  text-align: center;
}

.trsm-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: red;
}











/* Overlay – tamna pozadina */
.trsm-dialog-overlay {
    display: none; 
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* Aktiviranje overlay-a */
.trsm-dialog-overlay.visible {
    display: flex !important;
}

/* Kutija – isti stil kao loading-content */
.trsm-dialog-box {
    background: #242425;
    border: 4px solid #ff0100;
    padding: 40px 50px;
    border-radius: 0;
    text-align: center;
    color: #ff0100;
    font-weight: bold;
    font-size: 18px;
    min-width: 360px;
    box-shadow: 0 0 30px rgba(255,1,0,0.4);
    z-index: 10001;
}

/* Naslov */
.trsm-dialog-title {
    margin-bottom: 25px;
    color: #ff0100;
    font-size: 22px;
    font-weight: bold;
}

/* Dugmići */
.trsm-dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Osnovni stil dugmeta */
.trsm-dialog-btn {
    padding: 12px 20px;
    font-size: 16px;
    min-width: 150px;
    color: #fff !important;
    border: none;
    cursor: pointer;
}

/* Crveno dugme (danger) */
.trsm-btn-danger {
    background: #d9534f;
}

/* Zelena (success) */
.trsm-btn-success {
    background: #5cb85c;
}






