/* Reset styles to prevent theme conflicts */
.revgst-calculator * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.revgst-calculator {
    max-width: 500px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.revgst-header {
    background: #3498db;
    color: white;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.revgst-header i {
    font-size: 24px;
}

.revgst-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.revgst-input-section {
    padding: 25px;
}

.revgst-input-group {
    margin-bottom: 20px;
}

.revgst-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.revgst-input-group input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
    color: #2c3e50;
}

.revgst-input-group input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.revgst-rate-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Custom Select Styles */
.revgst-custom-select {
    position: relative;
    width: 100%;
}

.revgst-select-selected {
    background-color: white;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
    position: relative;
}

.revgst-select-selected:after {
    position: absolute;
    content: "▼";
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 12px;
    color: #7f8c8d;
}

.revgst-select-selected.revgst-select-active {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    border-radius: 8px 8px 0 0;
}

.revgst-select-selected.revgst-select-active:after {
    content: "▲";
}

.revgst-select-items {
    position: absolute;
    background-color: white;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border: 2px solid #3498db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.revgst-select-active + .revgst-select-items {
    display: block;
}

.revgst-select-option {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 16px;
    color: #2c3e50;
    transition: background-color 0.2s;
}

.revgst-select-option:hover {
    background-color: #f0f7ff;
}

.revgst-select-option.revgst-same-as-selected {
    background-color: #e1f0ff;
    font-weight: 600;
}

.revgst-select-items::-webkit-scrollbar {
    width: 8px;
}

.revgst-select-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 4px 0;
}

.revgst-select-items::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 4px;
}

.revgst-select-items::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.revgst-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.revgst-loading {
    color: #3498db;
    font-size: 14px;
    margin: 10px 25px;
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.revgst-loading i {
    margin-right: 5px;
}

.revgst-results {
    padding: 0 25px 25px;
    display: none;
}

.revgst-result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.revgst-result-item.revgst-total {
    background: #e1f7e3;
    border-left: 4px solid #27ae60;
    font-weight: bold;
}

.revgst-result-label {
    color: #2c3e50;
    flex: 1;
    font-weight: 500;
}

.revgst-result-value {
    color: #27ae60;
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

/* Responsive design */
@media (max-width: 600px) {
    .revgst-calculator {
        margin: 10px;
        border-radius: 10px;
    }
    
    .revgst-input-section {
        padding: 20px;
    }
    
    .revgst-rate-selectors {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .revgst-results {
        padding: 0 20px 20px;
    }
    
    .revgst-result-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .revgst-result-value {
        text-align: left;
    }
}

/* Close select when clicking outside */
.revgst-select-hide {
    display: none;
}