/* Dunk Calculator CSS - Scoped to prevent conflicts with WordPress themes */
.dunk-calc-container {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #343a40;
    box-sizing: border-box;
    padding: 0px;
}

.dunk-calc-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.dunk-calc-container .calculator-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.dunk-calc-container .calculator-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 6px 6px rgba(0, 0, 0, 0.07);
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.dunk-calc-container .calculator-card::before {
    content: "🏀";
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 100px;
    opacity: 0.03;
    transform: rotate(15deg);
    z-index: 0;
}

.dunk-calc-container .calculator-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.dunk-calc-container .section-title {
    font-size: 22px;
    margin: 25px 0 20px;
    font-weight: 700;
    color: #343a40;
    position: relative;
    display: inline-block;
}

.dunk-calc-container .section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #4361ee;
    border-radius: 3px;
}

/* Toggle Styles */
.dunk-calc-container .toggle-container {
    margin-bottom: 20px;
}

.dunk-calc-container .toggle-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #343a40;
    font-size: 16px;
}

.dunk-calc-container .toggle-buttons {
    display: flex;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 50px;
    padding: 3px;
    position: relative;
}

.dunk-calc-container .toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-transform: uppercase;
    font-size: 14px;
    background-color: transparent;
    color: #6c757d;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
}

.dunk-calc-container .toggle-btn.active {
    color: white;
}

.dunk-calc-container .toggle-buttons::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background-color: #4361ee;
    border-radius: 50px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

.dunk-calc-container .toggle-buttons:has(.toggle-btn:nth-child(2).active)::before {
    transform: translateX(100%);
}

/* Input Fields */
.dunk-calc-container .input-fields {
    margin-bottom: 24px;
}

.dunk-calc-container .input-row {
    background-color: #f9fafb;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.dunk-calc-container .input-row:hover {
    border-color: #ced4da;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dunk-calc-container .input-row label {
    font-weight: 600;
    color: #343a40;
    display: flex;
    align-items: center;
}

.dunk-calc-container .info-icon {
    color: #4895ef;
    font-size: 16px;
    margin-left: 8px;
    cursor: help;
    transition: transform 0.3s;
}

.dunk-calc-container .info-icon:hover {
    transform: scale(1.2);
    color: #4361ee;
}

.dunk-calc-container .imperial-inputs, 
.dunk-calc-container .metric-inputs {
    display: flex;
    gap: 10px;
}

.dunk-calc-container .input-group {
    position: relative;
    flex: 1;
}

.dunk-calc-container .input-group input {
    width: 100%;
    padding: 12px 36px 12px 15px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    font-size: 16px;
    transition: all 0.3s;
    text-align: center;
    font-weight: 500;
    color: #343a40;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) inset;
}

.dunk-calc-container .input-group input:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25), 0 2px 5px rgba(0, 0, 0, 0.05) inset;
}

.dunk-calc-container .input-group input:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.7;
}

.dunk-calc-container .input-group .unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
}

.dunk-calc-container .hide {
    display: none;
}

/* Results Panel */
.dunk-calc-container .results-panel {
    background-color: #ebf5ff;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #4361ee;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.dunk-calc-container .results-panel::before {
    content: "🏆";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    opacity: 0.2;
}

.dunk-calc-container .results-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #343a40;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.dunk-calc-container .results-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #4361ee;
}

.dunk-calc-container .result-line {
    margin-bottom: 15px;
    font-size: 17px;
    font-weight: 500;
}

.dunk-calc-container .result-value {
    margin-bottom: 18px;
    padding-left: 30px;
    position: relative;
    font-size: 16px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.dunk-calc-container .result-value:last-child {
    margin-bottom: 0;
}

.dunk-calc-container .result-value:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4361ee;
}

.dunk-calc-container .result-value:nth-child(2):before {
    background-color: #4cc9f0;
}

.dunk-calc-container .result-value:nth-child(3):before {
    background-color: #4895ef;
}

.dunk-calc-container .result-value:nth-child(4):before {
    background-color: #f72585;
}

.dunk-calc-container .result-value .value {
    font-size: 24px;
    font-weight: 700;
    color: #4361ee;
    margin-right: 5px;
}

.dunk-calc-container .result-value:nth-child(2) .value {
    color: #4cc9f0;
}

.dunk-calc-container .result-value:nth-child(3) .value {
    color: #4895ef;
}

.dunk-calc-container .result-value:nth-child(4) .value {
    color: #f72585;
}

.dunk-calc-container .result-value .unit {
    font-size: 16px;
    margin-right: 5px;
    color: #6c757d;
    font-weight: 600;
}

.dunk-calc-container .result-value .suffix {
    font-size: 16px;
    color: #343a40;
}

/* Author Credit */
.dunk-calc-container .author-credit {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.dunk-calc-container .author-credit i {
    color: #4361ee;
    margin: 0 4px;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .dunk-calc-container .input-row {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .dunk-calc-container .calculator-card {
        padding: 20px;
    }
    
    .dunk-calc-container .toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .dunk-calc-container .results-panel {
        padding: 20px;
    }
    
    .dunk-calc-container .result-value .value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .dunk-calc-container .imperial-inputs, 
    .dunk-calc-container .metric-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .dunk-calc-container .input-group input {
        padding: 10px 30px 10px 10px;
        font-size: 14px;
    }
    
    .dunk-calc-container .toggle-label, 
    .dunk-calc-container .input-row label {
        font-size: 14px;
    }
    
    .dunk-calc-container .result-line {
        font-size: 15px;
    }
    
    .dunk-calc-container .result-value {
        padding-left: 20px;
    }
    
    .dunk-calc-container .result-value .value {
        font-size: 18px;
    }
    
    .dunk-calc-container .result-value .unit, 
    .dunk-calc-container .result-value .suffix {
        font-size: 14px;
    }
}

/* Custom number input styling */
.dunk-calc-container input[type="number"] {
    -moz-appearance: textfield;
}

.dunk-calc-container input[type="number"]::-webkit-outer-spin-button,
.dunk-calc-container input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Animation for results */
@keyframes highlight {
    0% { background-color: rgba(67, 97, 238, 0.2); }
    50% { background-color: rgba(67, 97, 238, 0.1); }
    100% { background-color: transparent; }
}

.dunk-calc-container .highlight {
    animation: highlight 1.5s ease-out;
}

/* Tooltip styles */
.dunk-calc-container [data-tooltip] {
    position: relative;
}

.dunk-calc-container [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.dunk-calc-container [data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.dunk-calc-container [data-tooltip]:hover::after, 
.dunk-calc-container [data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.dunk-calc-container .info-icon::after {
    white-space: normal;
    width: 200px;
    text-align: center;
}

/* JS-added animations */
.dunk-calc-container .pulse {
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.dunk-calc-container .highlight-input {
    animation: highlight-input 0.5s ease-out;
}

@keyframes highlight-input {
    0% { background-color: rgba(67, 97, 238, 0.1); }
    100% { background-color: transparent; }
}

.dunk-calc-container .flash {
    animation: flash 0.5s ease-out;
}

@keyframes flash {
    0% { background-color: rgba(76, 201, 240, 0.3); }
    100% { background-color: #f0f0f0; }
}

.dunk-calc-container .input-group.focused input {
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25);
}

.dunk-calc-container .transition {
    animation: transition 0.5s ease-out;
}

@keyframes transition {
    0% { opacity: 0.8; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
} 