
/* Modern Reset & Base Styles */
.ipgeo-wrap {
    max-width: 1200px;
    margin: 20px;
}

.ipgeo-title {
    color: #1d2327;
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

/* Card Design */
.ipgeo-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.ipgeo-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ipgeo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.ipgeo-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

/* Typography */
.ipgeo-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 12px 0;
}

.ipgeo-section-header {
    margin-bottom: 24px;
}

.ipgeo-description {
    color: #646970;
    font-size: 13px;
    line-height: 1.5;
    margin: 8px 0 0 0;
}

.ipgeo-description-lg {
    font-size: 14px;
    margin-bottom: 20px;
}

.ipgeo-required {
    color: #d63638;
}

/* Form Elements */
.ipgeo-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #2c3338;
    margin-bottom: 6px;
    font-size: 13px;
}

.ipgeo-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 13px;
    color: #2c3338;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ipgeo-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
    outline: none;
}

.ipgeo-input-lg {
    padding: 10px 12px;
    font-size: 14px;
}

.ipgeo-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 13px;
    color: #2c3338;
    background: #ffffff;
    cursor: pointer;
}

.ipgeo-select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
    outline: none;
}

/* Radio Options */
.ipgeo-plan-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.ipgeo-radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #2c3338;
}

.ipgeo-radio-option input[type="radio"] {
    margin: 0;
}

/* Color Inputs */
.ipgeo-color-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipgeo-color {
    width: 40px;
    height: 40px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.ipgeo-color-value {
    font-size: 12px;
    color: #646970;
    font-family: monospace;
    background: #f6f7f7;
    padding: 4px 8px;
    border-radius: 3px;
}

/* Buttons */
.ipgeo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ipgeo-btn-primary {
    background: #2271b1;
    color: #ffffff;
    border-color: #2271b1;
}

.ipgeo-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.ipgeo-btn-secondary {
    background: #f6f7f7;
    color: #2c3338;
    border-color: #dcdcde;
}

.ipgeo-btn-secondary:hover {
    background: #f0f0f1;
    border-color: #c3c4c7;
}

.ipgeo-btn-outline {
    background: transparent;
    color: #d63638;
    border-color: #d63638;
}

.ipgeo-btn-outline:hover {
    background: #fcf0f1;
}

.ipgeo-btn-remove {
    background: transparent;
    border: none;
    color: #d63638;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
}

.ipgeo-btn-remove:hover {
    background: #fcf0f1;
}

/* Grid System */
.ipgeo-grid {
    display: grid;
    gap: 20px;
}

.ipgeo-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ipgeo-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ipgeo-col-span-3 {
    grid-column: span 3;
}

/* Sections */
.ipgeo-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.ipgeo-section-rules,
.ipgeo-section-exclusions {
    margin-bottom: 32px;
}

.ipgeo-section-api {
    border-left: 3px solid #2271b1;
}

/* Exclusion Grid */
.ipgeo-exclusion-grid {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 16px;
    align-items: end;
}

/* Popup Section */
.ipgeo-popup-section {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    border-left: 3px solid #2271b1;
}

.ipgeo-popup-preview {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.ipgeo-preview-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #646970;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.ipgeo-popup-box {
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ipgeo-popup-message {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3338;
}

.ipgeo-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.ipgeo-popup-btn {
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.ipgeo-popup-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Tooltips */
.ipgeo-tooltip {
    cursor: help;
    color: #2271b1;
    font-size: 12px;
    opacity: 0.7;
}

.ipgeo-tooltip:hover {
    opacity: 1;
}

/* Actions & Submit */
.ipgeo-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.ipgeo-submit-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
    text-align: right;
}

/* Responsive */
@media (max-width: 1200px) {
    .ipgeo-grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {

    .ipgeo-grid-cols-2,
    .ipgeo-grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .ipgeo-exclusion-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Animation for new elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ipgeo-rule,
.ipgeo-exclusion-rule {
    animation: fadeIn 0.3s ease;
}
