/**
 * Admin CSS for Multiloca Lite
 */

/* Custom CSS field visibility is controlled by JavaScript based on wcmlim_custom_css_enable setting */

/* Taxonomy fields styling */
.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
    width: 95%;
}

/* Tooltip styling */
.multiloca-tooltip {
    position: relative;
    display: inline-block;
}

.multiloca-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: 125%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: normal;
    width: 300px;
    font-size: 13px;
    line-height: 1.5;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: normal;
}

.multiloca-tooltip:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 115%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #000;
    z-index: 1001;
}

/* Business Hours Interface Styling */
.wcmlim-business-hours-container {
    max-width: 700px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.wcmlim-hours-header {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    padding: 12px 15px;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    color: #333;
}

.wcmlim-day-row {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s;
}

.wcmlim-day-row:hover {
    background-color: #f9f9f9;
}

.wcmlim-day-row:last-child {
    border-bottom: none;
}

.wcmlim-col-day {
    flex: 0 0 150px;
}

.wcmlim-col-opens,
.wcmlim-col-closes {
    flex: 0 0 150px;
    padding: 0 10px;
}

.wcmlim-day-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.wcmlim-day-checkbox input[type="checkbox"] {
    margin: 0 10px 0 0;
    cursor: pointer;
}

.wcmlim-day-label {
    font-weight: 500;
    color: #333;
}

.wcmlim-col-opens input[type="time"],
.wcmlim-col-closes input[type="time"] {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wcmlim-col-opens input[type="time"]:focus,
.wcmlim-col-closes input[type="time"]:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Settings page styling */
.multiloca-lite-settings-section {
    background: #fff;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.multiloca-lite-settings-section h2 {
    margin-top: 0;
}

/* Inventory metabox styling */
#multiloca_inventory .form-table th {
    width: 200px;
}

#multiloca_inventory .form-table input[type="number"] {
    width: 100px;
}

/* Settings tabs styling */
.admin-menu-setting-wcmlim {
    margin-top: 20px;
}

.tabset {
    max-width: 98%;
}

.tabset > input[type="radio"] {
    position: absolute;
    left: -200vw;
}

.tabset .tab-panel {
    display: none;
    padding: 30px;
    background: #fff;
    border: 1px solid #ccc;
}

.tabset > input:first-child:checked ~ .tab-panels > .tab-panel:first-child,
.tabset > input:nth-child(3):checked ~ .tab-panels > .tab-panel:nth-child(2),
.tabset > input:nth-child(5):checked ~ .tab-panels > .tab-panel:nth-child(3),
.tabset > input:nth-child(7):checked ~ .tab-panels > .tab-panel:nth-child(4) {
    display: block;
}

.tabset > label {
    position: relative;
    display: inline-block;
    padding: 15px 15px 25px;
    border: 1px solid transparent;
    border-bottom: 0;
    cursor: pointer;
    font-weight: 600;
    background: #f1f1f1;
}

.tabset > label::after {
    content: "";
    position: absolute;
    left: 15px;
    bottom: 10px;
    width: 22px;
    height: 4px;
    background: #8d8d8d;
}

.tabset > label:hover,
.tabset > input:focus + label {
    color: #06c;
}

.tabset > label:hover::after,
.tabset > input:focus + label::after,
.tabset > input:checked + label::after {
    background: #06c;
}

.tabset > input:checked + label {
    border-color: #ccc;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    background: #fff;
}

/* Documentation block styling */
.documentation-block {
    background: #fff;
    padding: 20px;
}

.documentation-block h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 25px;
}

.documentation-block h3:first-child {
    margin-top: 0;
}

.documentation-block ul {
    list-style: disc;
    margin-left: 20px;
}

.documentation-block code {
    background: #f5f5f5;
    padding: 3px 5px;
    border-radius: 3px;
}

/* Preview section styling */
.multiloca-preview-section {
    margin-top: 30px;
}

.multiloca-preview-container {
    background: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.multiloca-preview-container h3 {
    margin-top: 0;
}

/* Maintenance section styling */
.multiloca-maintenance-section {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.maintenance-tool {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
}

.maintenance-tool h3 {
    margin-top: 0;
    color: #333;
}

.maintenance-tool p {
    color: #666;
    margin-bottom: 15px;
}

.multiloca-location-expanded-item {
    margin-bottom: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    overflow: hidden;
}

.multiloca-location-header {
    padding: 10px 15px;
    background-color: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multiloca-location-header h4 {
    margin: 0;
    font-size: 16px;
}

.multiloca-toggle-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

.multiloca-popup-trigger, 
.multiloca-drawer-trigger {
    padding: 8px 12px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

label[for="tag-name"]::after,
label[for="wcmlim_city"]::after,
label[for="wcmlim_state"]::after ,
label[for="wcmlim_postal_code"]::after,
label[for="wcmlim_country"]::after {
    content: "*";
    color: #e32;
    font-size: 21px;
}

/* Start of styling the tabs in the admin settings page */
.ml-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  border-bottom: 2px solid #ccc;
}

.ml-tabs input[type="radio"] {
  display: none;
}

.ml-tabs label {
  background: #ffffff;
  padding: 12px 20px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
  margin-bottom: -1px;
  position: relative;
  top: 2px;
}

.ml-tabs label:hover {
  background: #e0f3ff;
  color: #007cba;
}

/* Active Tab (checked) Styling */
#ml-tab1:checked + label,
#ml-tab2:checked + label,
#ml-tab3:checked + label,
#ml-tab4:checked + label {
  background: #007cba;
  color: #fff;
  border-bottom: 2px solid #fff;
  z-index: 1;
}

.ml-tab-panel {
  display: none;
  padding: 20px;
  background: #fff;
  border: 1px solid #ccc;
}

input#ml-tab1:checked ~ .ml-panels #ml-panel1,
input#ml-tab2:checked ~ .ml-panels #ml-panel2,
input#ml-tab3:checked ~ .ml-panels #ml-panel3,
input#ml-tab4:checked ~ .ml-panels #ml-panel4 {
  display: block;
}

.ml-panels {
  width: 100%;
  background: #fff;
}

.wrap .ml-title {
  font-size: 24px;
  margin-bottom: 20px;
}

.documentation h3 {
  margin-top: 20px;
  font-size: 18px;
  color: #333;
}

.documentation ol,
.documentation ul {
  padding-left: 20px;
}

.documentation ul li::marker {
  color: #007cba;
}

/* End of Styling the tabs in the admin settings page */


  /* start of documentation tab styles */

.multiloca-container {
        font-family: 'Segoe UI', sans-serif;
        padding: 20px;
        max-width: 900px;
    }

    .section-title {
        font-size: 1.3em;
        font-weight: bold;
        margin-bottom: 15px;
        color: #2c3e50;
    }

    .feature-card {
        background: #f9f9f9;
        border-left: 4px solid #0073aa;
        padding: 15px 20px;
        margin-bottom: 10px;
        border-radius: 5px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        display: flex;
        align-items: center;  
        font-size: 14px;
    }

    .feature-card::before {
        content: "✔";
        color: #0073aa;
        font-weight: bold;
        margin-right: 10px;
    }

    .upgrade-button {
        display: inline-block;
        margin-top: 20px;
        background-color: #0073aa;
        color: white;
        padding: 12px 24px;
        border-radius: 5px;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.3s ease;
    }

    .upgrade-button:hover {
        color: #fff ;
    }

    /* end of documentation tab styles */