/* Main container for the entire calculator plugin */
.sfc-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Style for the instruction line */
.sfc-instruction-text {
    font-size: 1.1em;
    color: #4CAF50; /* Green color to draw attention */
    font-weight: 600;
    margin-bottom: 15px;
    padding: 10px 15px;
    background-color: #e8f5e9; /* Light green background */
    border-radius: 4px;
    border: 1px solid #c8e6c9;
}

/* --- START: CURRENCY SELECTOR STYLES --- */
.sfc-currency-selector-container {
    /* Adjusted padding/margin for better fit above buttons */
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 15px; 
    padding: 10px 0 0 0;
    border-top: 1px solid #eee; /* Light separator */
}

.sfc-currency-label {
    font-size: 1em;
    font-weight: bold;
    color: #555;
}

.sfc-currency-buttons {
    display: flex;
    gap: 10px;
}

.sfc-currency-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 15px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, border-color 0.3s;
}

.sfc-currency-btn:hover {
    background-color: #e0e0e0;
}

.sfc-currency-btn.active {
    background-color: #0073aa; /* Active color: Blue */
    color: white;
    border-color: #005684;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.4);
}
/* --- END: CURRENCY SELECTOR STYLES --- */


/* New CSS to style the Shape Selector Dropdown */
.sfc-shape-selector-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.sfc-shape-select-label {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

/* Attractive Styling for the Select Dropdown */
.sfc-shape-select {
    padding: 10px 15px;
    border: 3px solid #0073aa; /* Thicker, Prominent Blue Border */
    border-radius: 6px;
    background-color: #f0f8ff; /* Very light blue background */
    font-size: 1.1em; /* Slightly larger font */
    font-weight: bold;
    color: #004d6e;
    cursor: pointer;
    flex-grow: 1;
    max-width: 300px; 
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3); 
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230073aa%22%20d%3D%22M287%20177.3c-12-12-31-12-43%200l-88%2088c-12%2012-31%2012-43%200l-88-88c-12-12-31-12-43%200s-12%2031%200%2043l110%20110c12%2012%2031%2012%2043%200l110-110c12-12%2012-31%200-43z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat, repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
}

/* Hover effect for better feedback */
.sfc-shape-select:hover {
    border-color: #005684; /* Darker blue on hover */
    background-color: #e0f0ff;
}


/* Horizontal line separator between sections */
.sfc-separator {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 10px 0 30px 0; 
}


/* IMPORTANT: Initially hide ALL calculator sections. JS will show the default one (Rectangle) on load. */
.sfc-section {
    display: none; 
    padding: 20px 0;
}

/* Heading for each calculator shape */
.sfc-section h2 {
    color: #0073aa; 
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Rest of the styles (kept unchanged) */
.sfc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.sfc-input-group {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 5px; 
}

.sfc-input-group label {
    flex: 1;
    min-width: 120px;
    font-weight: bold;
    color: #555;
}

.sfc-input-group input[type="number"] {
    flex: 2;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f5f5f5;
    transition: border-color 0.3s;
    width: auto; 
}

.sfc-input-group input[type="number"]:focus {
    border-color: #0073aa;
    outline: none;
}

.sfc-unit-select, .sfc-price-unit-select {
    padding: 8px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f5f5f5;
}

.sfc-controls {
    justify-content: flex-start;
    margin-top: 20px;
}

.sfc-calculate-btn, .sfc-clear-btn {
    background-color: #4CAF50; 
    color: white;
    border: none;
    padding: 12px 25px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: bold;
}

.sfc-calculate-btn:hover {
    background-color: #45a049;
}

.sfc-clear-btn {
    background-color: #f44336; 
    margin-left: 10px;
}

.sfc-clear-btn:hover {
    background-color: #da190b;
}

.sfc-result {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    background-color: #e8f5e9;
    padding: 10px 15px;
    border-left: 5px solid #4CAF50;
    border-radius: 4px;
}

.sfc-result .error {
    color: #d32f2f;
    font-weight: normal;
    background-color: #ffebee;
    padding: 5px 10px;
    border-left: 5px solid #d32f2f;
    border-radius: 4px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .sfc-row {
        flex-direction: column;
        gap: 10px;
    }
    .sfc-input-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .sfc-input-group label {
        margin-bottom: 5px;
        min-width: unset;
    }
    .sfc-input-group input[type="number"], .sfc-unit-select, .sfc-price-unit-select, .sfc-shape-select {
        width: 100%;
        box-sizing: border-box; 
    }
    .sfc-controls {
        flex-direction: column;
        width: 100%;
    }
    .sfc-calculate-btn, .sfc-clear-btn {
        width: 100%;
        margin-left: 0;
        margin-bottom: 10px;
    }
    .sfc-shape-selector-container, .sfc-currency-selector-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .sfc-currency-buttons {
        width: 100%;
        justify-content: space-between;
    }
    .sfc-currency-btn {
        flex-grow: 1;
    }
}