/* Surface Area Calculator - WordPress Plugin Styles */

.sac-calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sac-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sac-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 500;
    color: #333;
}

.sac-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.sac-shape-selector {
    margin-bottom: 30px;
}

.sac-shape-selector h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #333;
}

.sac-shapes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.sac-shape-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sac-shape-card:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sac-shape-card.sac-selected {
    border-color: #2271b1;
    border-width: 2px;
    background-color: #f0f6fc;
}

.sac-shape-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px auto;
    color: #333;
}

.sac-shape-icon svg {
    width: 100%;
    height: 100%;
}

.sac-shape-card:hover .sac-shape-icon {
    color: #2271b1;
}

.sac-shape-card.sac-selected .sac-shape-icon {
    color: #2271b1;
}

.sac-shape-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.sac-calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .sac-calculator-grid {
        grid-template-columns: 1fr;
    }
}

.sac-inputs-section,
.sac-diagram-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sac-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
}

.sac-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.sac-input-group {
    margin-bottom: 15px;
}

.sac-input-group:last-child {
    margin-bottom: 0;
}

.sac-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.sac-input-row {
    display: flex;
    gap: 8px;
}

.sac-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.sac-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.sac-unit-select {
    width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.sac-unit-select:focus {
    outline: none;
    border-color: #2271b1;
}

#sac-results-card {
    min-height: 120px;
}

.sac-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sac-result-row:last-child {
    border-bottom: none;
}

.sac-result-row span:first-child {
    color: #666;
    font-size: 13px;
}

.sac-result-row span:last-child {
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.sac-result-primary span:last-child {
    font-size: 20px;
    color: #2271b1;
}

.sac-no-results {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
    margin: 0;
}

.sac-diagram {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 4px;
}

.sac-diagram-svg {
    width: 100%;
    height: auto;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    color: #666;
}

.sac-diagram-label {
    fill: currentColor;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sac-formulas-card {
    padding: 0;
}

.sac-formulas-toggle {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.sac-formulas-toggle:hover {
    background-color: #f9f9f9;
}

.sac-chevron {
    transition: transform 0.2s;
}

.sac-formulas-content {
    padding: 0 20px 20px 20px;
    background: #f9f9f9;
    border-radius: 0 0 6px 6px;
}

#sac-formulas {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}

#sac-formulas div {
    margin-bottom: 5px;
}
