/* SuccuCare Soil pH Guide - WordPress Plugin Styles */

/* Plugin Container */
.soil-ph-checker-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Styles */
.soil-ph-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #2d7d32, #388e3c);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(45, 125, 50, 0.3);
}

.soil-ph-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.soil-ph-icon {
    font-size: 2rem;
    margin-right: 8px;
}

.soil-ph-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.soil-ph-description {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Selector Card */
.soil-ph-selector-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.soil-ph-form-group {
    margin-bottom: 24px;
}

.soil-ph-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d7d32;
    font-size: 1rem;
}

/* Select Wrapper */
.soil-ph-select-wrapper {
    position: relative;
}

.soil-ph-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.soil-ph-select:focus {
    outline: none;
    border-color: #2d7d32;
    box-shadow: 0 0 0 3px rgba(45, 125, 50, 0.1);
}

.soil-ph-select:hover {
    border-color: #388e3c;
}

.soil-ph-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
}

/* Button Styles */
.soil-ph-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2d7d32, #388e3c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(45, 125, 50, 0.3);
    gap: 8px;
}

.soil-ph-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #1b5e20, #2d7d32);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 125, 50, 0.4);
}

.soil-ph-button:active {
    transform: translateY(0);
}

.soil-ph-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.soil-ph-button-icon {
    font-size: 1.2rem;
}

/* Results Styles */
.soil-ph-results {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results Header */
.soil-ph-results-header {
    background: linear-gradient(135deg, #2d7d32, #388e3c);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.soil-ph-crop-info h3.soil-ph-crop-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.soil-ph-optimal-label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    opacity: 0.95;
    gap: 8px;
}

.soil-ph-check-icon {
    font-size: 1.2rem;
}

.soil-ph-range-display {
    text-align: right;
}

.soil-ph-range-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.soil-ph-range-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Growing Notes */
.soil-ph-growing-notes {
    padding: 24px;
}

.soil-ph-section-title {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d7d32;
    margin: 0 0 16px 0;
    gap: 8px;
}

.soil-ph-lightbulb {
    font-size: 1.3rem;
}

.soil-ph-note-content {
    background: rgba(45, 125, 50, 0.05);
    border-left: 4px solid #2d7d32;
    padding: 16px;
    border-radius: 6px;
}

.soil-ph-note-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Additional Info Cards */
.soil-ph-additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 24px 24px;
}

.soil-ph-info-card {
    background: rgba(56, 142, 60, 0.05);
    border: 1px solid rgba(45, 125, 50, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.soil-ph-info-title {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #2d7d32;
    margin: 0 0 12px 0;
    gap: 8px;
}

.soil-ph-tip-icon,
.soil-ph-alert-icon {
    font-size: 1.1rem;
}

.soil-ph-tips-list {
    margin: 0;
    padding-left: 20px;
    color: #555;
}

.soil-ph-tips-list li {
    margin-bottom: 6px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Database Info */
.soil-ph-database-info {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.soil-ph-database-title {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d7d32;
    margin: 0 0 20px 0;
    gap: 10px;
}

.soil-ph-database-icon {
    font-size: 1.5rem;
}

/* Stats Grid */
.soil-ph-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.soil-ph-stat {
    text-align: center;
    padding: 16px;
    background: rgba(45, 125, 50, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(45, 125, 50, 0.1);
}

.soil-ph-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2d7d32;
    margin-bottom: 4px;
}

.soil-ph-stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Categories Grid */
.soil-ph-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.soil-ph-category {
    background: rgba(56, 142, 60, 0.05);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(45, 125, 50, 0.1);
    font-size: 0.9rem;
    color: #333;
    text-align: center;
}

/* Footer */
.soil-ph-footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 20px;
}

.soil-ph-footer-text {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.soil-ph-footer-text strong {
    color: #2d7d32;
}

/* Responsive Design */
@media (max-width: 768px) {
    .soil-ph-checker-container {
        margin: 10px;
        max-width: none;
    }
    
    .soil-ph-header {
        padding: 20px 15px;
    }
    
    .soil-ph-title {
        font-size: 1.6rem;
    }
    
    .soil-ph-title-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .soil-ph-description {
        font-size: 1rem;
    }
    
    .soil-ph-selector-card {
        padding: 20px;
    }
    
    .soil-ph-results-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .soil-ph-range-display {
        text-align: center;
    }
    
    .soil-ph-crop-info h3.soil-ph-crop-name {
        font-size: 1.5rem;
    }
    
    .soil-ph-range-value {
        font-size: 1.8rem;
    }
    
    .soil-ph-additional-info {
        grid-template-columns: 1fr;
        padding: 0 16px 16px;
    }
    
    .soil-ph-growing-notes,
    .soil-ph-database-info {
        padding: 16px;
    }
    
    .soil-ph-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .soil-ph-stat-number {
        font-size: 1.6rem;
    }
    
    .soil-ph-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .soil-ph-title {
        font-size: 1.4rem;
    }
    
    .soil-ph-description {
        font-size: 0.95rem;
    }
    
    .soil-ph-selector-card {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .soil-ph-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .soil-ph-button {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .soil-ph-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .soil-ph-stat {
        padding: 12px 8px;
    }
    
    .soil-ph-stat-number {
        font-size: 1.4rem;
    }
    
    .soil-ph-stat-label {
        font-size: 0.8rem;
    }
}

/* Focus and Accessibility Styles */
.soil-ph-select:focus,
.soil-ph-button:focus {
    outline: 2px solid #2d7d32;
    outline-offset: 2px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .soil-ph-header,
    .soil-ph-results-header {
        background: #1b5e20;
    }
    
    .soil-ph-button {
        background: #1b5e20;
        border: 2px solid #ffffff;
    }
    
    .soil-ph-select {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .soil-ph-button:hover:not(:disabled) {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .soil-ph-checker-container {
        max-width: none;
        margin: 0;
        box-shadow: none;
    }
    
    .soil-ph-header,
    .soil-ph-results-header {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .soil-ph-button {
        display: none;
    }
    
    .soil-ph-selector-card {
        border: 2px solid #000;
    }
}

/* WordPress Theme Compatibility */
.soil-ph-checker-container * {
    box-sizing: border-box;
}

.soil-ph-checker-container h1,
.soil-ph-checker-container h2,
.soil-ph-checker-container h3,
.soil-ph-checker-container h4,
.soil-ph-checker-container h5 {
    font-family: inherit;
}

/* Reset potential theme conflicts */
.soil-ph-checker-container ul {
    list-style-type: disc;
    padding-left: 20px;
}

.soil-ph-checker-container p {
    margin-bottom: 1em;
}

.soil-ph-checker-container input,
.soil-ph-checker-container select,
.soil-ph-checker-container button {
    font-family: inherit;
}

/* Dark theme support (if WordPress theme supports it) */
@media (prefers-color-scheme: dark) {
    .wp-dark-theme .soil-ph-checker-container {
        color: #e0e0e0;
    }
    
    .wp-dark-theme .soil-ph-selector-card,
    .wp-dark-theme .soil-ph-results,
    .wp-dark-theme .soil-ph-database-info {
        background: #2c2c2c;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .wp-dark-theme .soil-ph-select {
        background: #2c2c2c;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .wp-dark-theme .soil-ph-note-content {
        background: rgba(45, 125, 50, 0.15);
    }
    
    .wp-dark-theme .soil-ph-info-card,
    .wp-dark-theme .soil-ph-category,
    .wp-dark-theme .soil-ph-stat {
        background: rgba(45, 125, 50, 0.15);
        border-color: rgba(45, 125, 50, 0.3);
        color: #e0e0e0;
    }
    
    .wp-dark-theme .soil-ph-footer {
        background: #2c2c2c;
        border-color: #404040;
    }
    
    .wp-dark-theme .soil-ph-footer-text {
        color: #b0b0b0;
    }
}