/* geo-rules-manager styles */
.geo-rules-container {
    max-height: 700px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.geo-rules-wrapper{
    display: flex;
    flex-direction: column-reverse;
}

.geo-rule-card {
    margin-bottom: 8px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.rule-actions {
    padding: 0 20px 20px;
    text-align: right;
}

.geo-condition .mgeo-geo-rule-select{
    color: black;
}

.geo-condition .mgeo-geo-rule-select .components-input-control__container, .geo-condition .mgeo-geo-rule-select .components-text-control__input{
    background:none;
}

.geo-condition .mgeo-geo-rule-select .components-input-control__container .components-input-control__backdrop{
    border-width: 0px;
}

.remove-rule-button.components-button.is-destructive {
    background: #d63638;
    color: white;
    border: none;
    padding: 6px 12px;
    height: auto;
}

.remove-rule-button.components-button.is-destructive:hover {
    background: #b32d2e;
    color: white;
}

.geo-rule-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.geo-rule-conditions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.geo-condition {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.geo-condition .components-select-control {
    margin-bottom: 0px;
}

.geo-rule-card-header{
    width:100%;
}

.geo-rule-card .components-card__header {
    background-color: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    padding: 16px;
}

.geo-rule-card .components-card__body {
    padding: 20px;
}

.geo-rule-add-button {
    width: 100%;
    justify-content: center;
    margin-top: 16px !important;
    height: 40px;
    font-weight: 500;
}

.add-condition-button {
    margin-top: 16px;
    height: 36px;
}

.components-select-control,
.components-text-control {
    margin-bottom: 16px;
    flex: 1;
}

.mgeo-geo-condition-grabber {
    cursor: grab;
    color: #757575;
    padding: 0 10px;
    font-size: 16px;
}

.geo-rule-card label {
    font-size: 11px;
    font-weight: 500;
    color: #1e1e1e;
    text-transform: uppercase;
}

.visibility-toggle label {
    padding-bottom: 14px;
}

.visibility-toggle .components-button-group {
    display: flex;
    gap: 8px;
}

.visibility-toggle .components-button {
    height: 36px;
    padding: 0 16px;
}

.visibility-toggle .dashicon {
  margin-right: 4px;
}

.mgeo-admin-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.mgeo-main-content {
    flex: 2;
    min-width: 0; /* Prevents flex item from overflowing */
}

.mgeo-sidebar {
    flex: 1;
    min-width: 250px;
}

@media screen and (max-width: 782px) {
    .mgeo-admin-container {
        flex-direction: column-reverse;
    }
    
    .mgeo-sidebar {
        width: 100%;
    }
}

.mgeo-admin-card {
    background: white;
    border: 1px solid #ccd0d4;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.mgeo-admin-card h2 {
    margin-top: 0;
}

.mgeo-admin-tab {
    display: none;
}

.mgeo-admin-tab.active {
    display: block;
}

.mgeo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mgeo-stat-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.mgeo-stat-number {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
    color: #2271b1;
}

.mgeo-stat-text {
    font-size: 18px;
    margin: 10px 0;
    color: #2271b1;
}

.geo-rules-save-button {
    margin-top: 20px;
    padding: 10px;
}

/* Searchable dropdown css */

.searchable-dropdown {
    position: relative;
    width: 100%;
  }
  
  .searchable-dropdown__options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 2px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .searchable-dropdown__option {
    padding: 8px 12px;
    cursor: pointer;
  }
  
  .searchable-dropdown__option:hover {
    background-color: #f0f0f0;
  }
  