/* ----------------------------------------------------------------------------------------
* Author        : zamzamcoders
* Plugin Name : Size Chart Manager for WooCommerce
* File          : CSS File
* Version       : 1.0.0
* ---------------------------------------------------------------------------------------- */
/* INDEX
----------------------------------------------------------------------------------------
01. Global Variables
02. size chart settings css
-------------------------------------------------------------------------------------- */

/************************************/
/*** 	 01. Global Variables	  ***/
/************************************/

:root {
  --primary-color: #0d6efd;
  --secondary-color: #f9f9f9;
  --highlight-color: #28a745;
  --highlight-color-hover: #218838;
  --danger-color: #dc3545;
  --border-color: #ddd;
  --background-color-light: rgba(207, 207, 207, 0.24);
  --background-color-dark: #f8f9fa;
  --text-color-dark: #333;
  --text-color-light: #666;
  --color-white: #ffffff;
  --color-light-gray: #DCDCDC;
  --color-light-background: #F5F5F5;
  --color-disabled-text: #DFEDFB;
  --color-input-border: #d0cae9;
}

/************************************/
/*** 	 02. size chart settings css	  ***/
/************************************/
.sizechama-product-size-chats {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

.sizechama-product-size-chats th,
.sizechama-product-size-chats td {
  padding: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sizechama-product-size-chats thead th {
  position: sticky;
  top: 0;
  background: var(--secondary-color);
  z-index: 1;
}

.sizechama-product-size-chats th,
.sizechama-product-size-chats td {
  border: 1px solid var(--border-color);
  text-align: center;
  padding: 10px;
}

.sizechama-product-size-chats th {
  background-color: var(--background-color-dark);
  font-weight: bold;
}

.sizechama-product-size-chats .action-btns {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.sizechama-product-size-chats .btn {
  padding: 5px 10px;
  cursor: pointer;
  color: var(--color-white);
  border: none;
  border-radius: 3px;
  font-size: 14px;
}

.sizechama-product-size-chats .btn-add {
  background-color: var(--highlight-color);
}

.sizechama-product-size-chats .btn-add:hover {
  background-color: var(--highlight-color-hover);
}

.sizechama-product-size-chats .btn-remove {
  background-color: var(--danger-color);
}

.sizechama-product-size-chats .btn-remove:hover {
  background-color: var(--danger-color);
}

.sizechama-product-size-chats input,
.sizechama-product-size-chats input:focus {
  border: none;
  background: transparent;
  outline: none;
  box-shadow: none;
}

.sizechama-product-size-chats th,
.sizechama-product-size-chats td {
  padding: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sizechama-product-size-chats thead th {
  position: sticky;
  top: 0;
  background: var(--secondary-color);
  z-index: 1;
}

.sizechama-general-item.sizechama-select-product-fields
  .sizechama-extra-product-fields-select
  .select2-container,
.sizechama-general-item.cmfw-select-product-categories
  .sizechama-extra-product-fields-select
  .select2-container {
  width: 100% !important;
}

.sizechama-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  border-bottom: 1px solid var(--border-color);
}
.sizechama-tabs li {
  margin: 0;
  padding: 0;
}
.sizechama-tabs a {
  padding: 8px 12px;
  display: block;
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-bottom: none;
}
.sizechama-tabs a.active {
  background: var(--secondary-color);
  font-weight: bold;
}
.sizechama-tab-content {
  padding: 12px;
  border: 1px solid var(--border-color);
}
#sizechama-product-search {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
}

.sizechama-apply-all-product {
  margin: 15px 0;
}

/*
admin settings page css
*/

.sizechama-settings-wrapper {
  font-family: Arial, sans-serif;
  padding: 20px;
  border-radius: 8px;
  background-color: var(--background-color-light);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 800px;
}

.sizechama-settings-wrapper .sizechama-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: none !important;
}

.sizechama-tab-link {
  flex: 1;
  margin: 0;
  position: relative;
  display: block;
  color: var(--color-heading);
  z-index: 2;
  padding: 10px 25px;
  border-radius: 500px;
  outline: none;
  border: none;
  transition: background-color 0.3s, color 0.3s;
  background-color: rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.sizechama-tab-link:focus {
  outline: none;
}

.sizechama-tab-link.active,
.sizechama-tab-link:hover {
  background-color: var(--primary-color);
  color: var(--color-white);
}

.sizechama-tab-content-settings {
  padding: 0;
  border-radius: 8px;
}

.sizechama-input-number {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sizechama-input-number button {
  background: var(--border-color);
  border: none;
  padding: 5px 15px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.sizechama-input-number button:hover {
  background-color: #bbb;
}

.sizechama-input-number input {
  width: 60px;
  text-align: center;
  font-size: 16px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.sizechama-settings-wrapper label {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color-dark);
}

.sizechama-settings-wrapper select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-bottom: 15px;
}

.sizechama-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.sizechama-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sizechama-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.sizechama-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-white);
  transition: 0.4s;
  border-radius: 50%;
}

.sizechama-toggle input:checked + .sizechama-slider {
  background-color: var(--primary-color);
}

.sizechama-toggle input:checked + .sizechama-slider:before {
  transform: translateX(26px);
}

.sizechama-tab-content-settings p {
  color: var(--text-color-light);
  font-size: 14px;
}

.sizechama-settings-wrapper input[type="text"],
.sizechama-settings-wrapper input[type="number"] {
  width: 100%;
  padding: 5px 10px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-bottom: 15px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease;
}

.sizechama-settings-wrapper input[type="text"]:focus,
.sizechama-settings-wrapper input[type="number"]:focus {
  border-color: var(--primary-color);
  outline: none;
}

.sizechama-settings-wrapper label {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color-dark);
}

.sizechama-tab-content-settings {
  display: none;
}

.sizechama-tab-content-settings.active-tab {
  display: block;
}

.sizechama-tab-link.active {
  background-color: var(--primary-color);
  color: var(--color-white);
}

.sizechama-settings-wrapper {
  display: flex;
  gap: 40px;
  margin-top: 50px;
}

.cmfw-tab-left-wrapper {
  width: 33.33%;
}

.sizechama-content-right-wrapper {
  width: 66.66%;
}

.sizechama-settings-wrapper .sizechama-tabs {
  flex-direction: column;
}

.sizechama-settings-wrapper .sizechama-tab-content-settings select {
  max-width: 100%;
  box-shadow: none;
  background-color: transparent;
  border: 1px solid var(--color-input-border);
}

.sizechama-settings-wrapper input[type="text"],
.sizechama-settings-wrapper input[type="number"] {
  box-shadow: none;
  background-color: transparent;
  border: 1px solid var(--color-input-border);
}

.sizechama-settings-wrapper label {
  margin-bottom: 15px;
}

.sizechama-tab-content-settings .cmfw-save-button-option {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
}

input#sizechama-size-chart-submit,
input.sizechama-size-chart-color-save {
  background-color: var(--primary-color) !important;
  color: var(--color-white);
  border: none;
}

input#sizechama-size-chart-submit:focus {
  border: none;
  box-shadow: none;
  outline: none;
}

.sizechama-tab-content-settings .sizechama-general-item {
  margin-bottom: 20px;
}

.sizechama-tab-content-settings .button-primary[disabled] {
  color: #dfedfb !important;
  background-color: var(--primary-color) !important;
}


.sizechama-general-item .sizechama-border-size-wrapper {
  display: flex;
  align-items: center;
  font-family: Arial, sans-serif;
}

.sizechama-general-item .sizechama-border-size {
  border: 1px solid var(--color-light-gray);
  width: 50px;
  border-radius: 4px 0 0 4px;
  font-size: 16px;
  margin-bottom: 0!important;
}

.sizechama-general-item .sizechama-border-size-unit {
  background-color: #f5f5f5;
  border: 1px solid var(--color-light-gray);
  border-left: none;
  padding: 10px;
  border-radius: 0 4px 4px 0;
  font-size: 15px;
}

.sizechama-border-size-input-field .sizechama-gen-item-con {
  display: flex;
  flex-direction: column;
}

.sizechama-border-size-input-field .sizechama-gen-item-con .sizechama-border-size-wrapper input[type="text"]{
  border-radius: 4px 0 0 4px;
}

input.sizechama-border-size {
  width: 15% !important;
}

.sizechama-tab-content-field textarea {
  box-shadow: none;
  background-color: transparent;
  border: 1px solid var(--color-input-border);
  padding: 10px;
}
