/* Pokémon Type Calculator - Mobile Responsive */
.pokemon-type-calculator-wrapper {
    font-family: 'Roboto', sans-serif;
    background: #f5f7fa;
    color: #2A2A2A;
    padding: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Mobile First - Everything stacks */
.pokemon-type-calculator-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Main layout */
.pokemon-type-calculator-wrapper .main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Calculator row - stacks on mobile */
.pokemon-type-calculator-wrapper .calculator-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .pokemon-type-calculator-wrapper .calculator-row {
        flex-direction: row;
        gap: 30px;
    }
    
    .pokemon-type-calculator-wrapper .calculator-row > * {
        flex: 1;
    }
}

/* Cards */
.pokemon-type-calculator-wrapper .card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
}

/* Title */
.pokemon-type-calculator-wrapper .card-title {
    font-size: 1.4rem;
    color: #3D7DCA;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFCB05;
}

/* Type selector */
.pokemon-type-calculator-wrapper .type-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Labels */
.pokemon-type-calculator-wrapper label {
    display: block;
    font-weight: 500;
    color: #3D7DCA;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Dropdowns */
.pokemon-type-calculator-wrapper .custom-select {
    position: relative;
    width: 100%;
}

.pokemon-type-calculator-wrapper .custom-select select {
    width: 100%;
    padding: 15px;
    padding-left: 60px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px; /* Prevents iOS zoom */
    background: white;
    appearance: none;
    cursor: pointer;
}

/* Mobile touch improvements */
@media (max-width: 767px) {
    .pokemon-type-calculator-wrapper .custom-select select {
        min-height: 50px;
        font-size: 16px;
    }
}

/* Type icon in dropdown */
.pokemon-type-calculator-wrapper .type-icon-dropdown {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
}

/* Arrow */
.pokemon-type-calculator-wrapper .custom-select::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #3D7DCA;
    pointer-events: none;
}

/* Effectiveness display */
.pokemon-type-calculator-wrapper .effectiveness-display {
    text-align: center;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 20px;
    border: 2px solid #e0e0e0;
}

/* Multiplier text */
.pokemon-type-calculator-wrapper .multiplier {
    font-size: 3.5rem;
    font-weight: bold;
    color: #3D7DCA;
    margin: 15px 0;
}

/* Effectiveness text */
.pokemon-type-calculator-wrapper .effectiveness-text {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 12px 25px;
    border-radius: 30px;
    display: inline-block;
    margin: 15px 0;
}

/* Color classes */
.pokemon-type-calculator-wrapper .super-effective {
    background: #4CAF50;
    color: white;
}

.pokemon-type-calculator-wrapper .not-effective {
    background: #F44336;
    color: white;
}

.pokemon-type-calculator-wrapper .no-effect {
    background: #9E9E9E;
    color: white;
}

.pokemon-type-calculator-wrapper .neutral {
    background: #FFC107;
    color: #333;
}

/* Type badges */
.pokemon-type-calculator-wrapper .type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

/* Mobile badges */
@media (max-width: 767px) {
    .pokemon-type-calculator-wrapper .type-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .pokemon-type-calculator-wrapper .type-badge {
        width: 90%;
        max-width: 300px;
    }
}

.pokemon-type-calculator-wrapper .type-badge {
    padding: 12px 20px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

/* Quick type selection */
.pokemon-type-calculator-wrapper .type-icons-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

/* Mobile grid */
@media (max-width: 767px) {
    .pokemon-type-calculator-wrapper .type-icons-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (min-width: 768px) {
    .pokemon-type-calculator-wrapper .type-icons-preview {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }
}

.pokemon-type-calculator-wrapper .type-icon-preview {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.pokemon-type-calculator-wrapper .type-icon-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Type icon */
.pokemon-type-calculator-wrapper .type-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin: 0 auto 8px;
}

/* Reset button */
.pokemon-type-calculator-wrapper .reset-btn {
    background: #3D7DCA;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s;
}

.pokemon-type-calculator-wrapper .reset-btn:hover {
    background: #2a6bb1;
    transform: translateY(-2px);
}

/* Detailed result */
.pokemon-type-calculator-wrapper .detailed-result {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.pokemon-type-calculator-wrapper .result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .pokemon-type-calculator-wrapper .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pokemon-type-calculator-wrapper .result-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3D7DCA;
}

/* Type chart */
.pokemon-type-calculator-wrapper .type-chart {
    overflow-x: auto;
    margin-top: 20px;
}

.pokemon-type-calculator-wrapper table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
}

.pokemon-type-calculator-wrapper th {
    background: #3D7DCA;
    color: white;
    padding: 15px;
    text-align: left;
}

.pokemon-type-calculator-wrapper td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

/* Legend */
.pokemon-type-calculator-wrapper .effectiveness-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

@media (max-width: 767px) {
    .pokemon-type-calculator-wrapper .effectiveness-legend {
        flex-direction: column;
        align-items: center;
    }
}

.pokemon-type-calculator-wrapper .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pokemon-type-calculator-wrapper .legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Empty state */
.pokemon-type-calculator-wrapper .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* Instructions */
.pokemon-type-calculator-wrapper .instructions {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #FFCB05;
    font-size: 0.95rem;
}

/* Very small phones */
@media (max-width: 480px) {
    .pokemon-type-calculator-wrapper {
        padding: 10px;
    }
    
    .pokemon-type-calculator-wrapper .card {
        padding: 15px;
    }
    
    .pokemon-type-calculator-wrapper .multiplier {
        font-size: 2.8rem;
    }
    
    .pokemon-type-calculator-wrapper .effectiveness-text {
        font-size: 1.2rem;
        padding: 10px 20px;
    }
    
    .pokemon-type-calculator-wrapper .type-icons-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .pokemon-type-calculator-wrapper .type-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Landscape mode */
@media (max-width: 767px) and (orientation: landscape) {
    .pokemon-type-calculator-wrapper .calculator-row {
        flex-direction: row;
        gap: 15px;
    }
    
    .pokemon-type-calculator-wrapper .type-icons-preview {
        grid-template-columns: repeat(4, 1fr);
        max-height: 120px;
        overflow-y: auto;
    }
}

/* Make sure everything fits on screen */
.pokemon-type-calculator-wrapper * {
    box-sizing: border-box;
}

/* Force no theme interference */
.entry-content .pokemon-type-calculator-wrapper,
.content .pokemon-type-calculator-wrapper,
.article-content .pokemon-type-calculator-wrapper {
    margin: 0 !important;
    padding: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
}