/**
 * MSW Pet Ownership Cost Calculator - Styles
 * Version: 1.1.0 - Multi-pet support
 */

/* ==========================================================================
   BASE CALCULATOR STYLES
   ========================================================================== */

.msw-pet-ownership {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Verdana', 'Arial', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #333333;
}

.msw-calculator__header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #8B7355;
}

.msw-calculator__title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 36px;
    font-weight: 600;
    color: #6B5344;
    margin: 0 0 15px 0;
}

.msw-calculator__subtitle {
    font-size: 20px;
    color: #666666;
    margin: 0;
}

.msw-calculator__instructions {
    background: #FFF8F0;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border-left: 4px solid #D4925A;
}

.msw-logged-in-notice {
    display: inline-block;
    padding: 8px 16px;
    background: #F0F9F5;
    color: #2E5F3A;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

/* ==========================================================================
   FORM SECTIONS
   ========================================================================== */

.msw-form-section {
    background: #FFFFFF;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 2px solid #E8E8E8;
}

.msw-form-section__title {
    font-size: 24px;
    font-weight: 600;
    color: #6B5344;
    margin: 0 0 20px 0;
}

/* ==========================================================================
   PET SELECTOR
   ========================================================================== */

.msw-pet-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.msw-pet-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #F9F9F9;
    border: 3px solid #E8E8E8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msw-pet-option:hover {
    background: #FFF8F0;
    border-color: #D4925A;
    transform: translateY(-2px);
}

.msw-pet-option.active {
    background: #FFF8F0;
    border-color: #8B7355;
    box-shadow: 0 4px 8px rgba(139, 115, 85, 0.2);
}

.msw-pet-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.msw-pet-name {
    font-size: 18px;
    font-weight: 600;
    color: #6B5344;
}

.msw-pet-note {
    font-size: 12px;
    color: #999999;
    margin-top: 5px;
    text-align: center;
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */

.msw-form-row {
    margin-bottom: 20px;
}

.msw-form-group {
    margin-bottom: 0;
}

.msw-form-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

.msw-form-required {
    color: #C76868;
}

.msw-form-select,
.msw-form-input {
    width: 100%;
    font-size: 18px;
    border: 2px solid #CCCCCC;
    border-radius: 6px;
    background: #FFFFFF;
    font-family: 'Verdana', 'Arial', sans-serif;
}

.msw-form-select:focus,
.msw-form-input:focus {
    outline: 3px solid #D4925A;
    outline-offset: 2px;
    border-color: #8B7355;
}

.msw-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
}

.msw-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.msw-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.msw-button {
    padding: 16px 32px;
    font-size: 20px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msw-button--primary {
    background: #8B7355;
    color: #FFFFFF;
    border: 2px solid #8B7355;
}

.msw-button--primary:hover {
    background: #6B5344;
    border-color: #6B5344;
}

.msw-button--primary:focus {
    outline: 3px solid #D4925A;
    outline-offset: 2px;
}

/* ==========================================================================
   ERROR MESSAGE
   ========================================================================== */

.msw-error-message {
    text-align: center;
    color: #C76868;
    font-weight: 600;
    font-size: 16px;
    margin-top: 15px;
    padding: 10px;
    display: none;
}

.msw-error-message.active {
    display: block;
}

/* ==========================================================================
   PET CARDS (My Pets list)
   ========================================================================== */

.msw-pets-list {
    background: #FFFFFF;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 2px solid #E8E8E8;
}

#msw-pets-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msw-pet-card {
    background: #FFF8F0;
    border: 2px solid #E8DDD0;
    border-radius: 8px;
    padding: 20px;
}

.msw-pet-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.msw-pet-card__name {
    font-size: 20px;
    font-weight: 600;
    color: #6B5344;
    margin: 0;
}

.msw-button-remove {
    background: #C76868;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.msw-button-remove:hover {
    background: #A55050;
}

.msw-button-remove:focus {
    outline: 3px solid #D4925A;
    outline-offset: 2px;
}

.msw-pet-card__details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.msw-pet-card__tag {
    display: inline-block;
    padding: 4px 12px;
    background: #FFFFFF;
    border: 1px solid #D4C4B0;
    border-radius: 20px;
    font-size: 14px;
    color: #6B5344;
}

.msw-pet-card__costs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.msw-pet-card__cost-item {
    text-align: center;
    padding: 10px;
    background: #FFFFFF;
    border-radius: 6px;
    border: 1px solid #E8E8E8;
}

.msw-pet-card__cost-label {
    display: block;
    font-size: 13px;
    color: #888888;
    margin-bottom: 4px;
}

.msw-pet-card__cost-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #6B5344;
}

/* ==========================================================================
   RESULTS SECTION
   ========================================================================== */

.msw-results {
    background: #FFFFFF;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 2px solid #8B7355;
}

.msw-results__title {
    font-size: 24px;
    font-weight: 600;
    color: #6B5344;
    margin: 0 0 20px 0;
    text-align: center;
}

.msw-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.msw-result-card {
    text-align: center;
    padding: 20px;
    background: #F9F9F9;
    border-radius: 6px;
    border: 2px solid #E8E8E8;
}

.msw-result-card--primary {
    background: #6B5344;
    border-color: #6B5344;
}

.msw-result-card--primary .msw-result-card__label,
.msw-result-card--primary .msw-result-card__value,
.msw-result-card--primary .msw-result-card__note {
    color: #FFFFFF;
}

.msw-result-card__label {
    font-size: 14px;
    color: #666666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msw-result-card__value {
    font-size: 32px;
    font-weight: 700;
    color: #6B5344;
    margin-bottom: 4px;
}

.msw-result-card__note {
    font-size: 13px;
    color: #999999;
}

/* ==========================================================================
   PER-PET BREAKDOWNS
   ========================================================================== */

.msw-pet-breakdown {
    margin-bottom: 25px;
    padding: 20px;
    background: #FAFAFA;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
}

.msw-pet-breakdown__title {
    font-size: 20px;
    font-weight: 600;
    color: #6B5344;
    margin: 0 0 15px 0;
}

.msw-pet-breakdown__subtitle {
    font-weight: 400;
    font-size: 16px;
    color: #888888;
}

.msw-pet-breakdown__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.msw-pet-breakdown__column h5 {
    font-size: 16px;
    font-weight: 600;
    color: #555555;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #E0E0E0;
}

.msw-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 16px;
}

.msw-breakdown-name {
    color: #555555;
}

.msw-breakdown-cost {
    font-weight: 600;
    color: #333333;
}

.msw-breakdown-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #8B7355;
    font-size: 16px;
    color: #6B5344;
}

/* ==========================================================================
   INSIGHTS
   ========================================================================== */

.msw-insights {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #E8E8E8;
}

.msw-insight {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #FFF8F0;
    border-radius: 6px;
    border-left: 4px solid #D4925A;
    font-size: 16px;
    line-height: 1.5;
}

.msw-insight__icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* ==========================================================================
   SAVE / PRINT ACTIONS
   ========================================================================== */

.msw-calc-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.msw-calc-actions__save {
    background: #6B5344;
    color: #FFFFFF;
    border: 2px solid #6B5344;
}

.msw-calc-actions__save:hover {
    background: #5A4537;
    border-color: #5A4537;
}

.msw-calc-actions__print {
    background: #FFFFFF;
    color: #6B5344;
    border: 2px solid #8B7355;
}

.msw-calc-actions__print:hover {
    background: #FFF8F0;
}

/* ==========================================================================
   TIPS SECTION
   ========================================================================== */

.msw-tips {
    background: #F0F9F5;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #D0E8D8;
}

.msw-tips__title {
    font-size: 22px;
    color: #2E5F3A;
    margin: 0 0 15px 0;
}

.msw-tips__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.msw-tips__list li {
    padding: 8px 0;
    font-size: 16px;
    border-bottom: 1px solid #D0E8D8;
    line-height: 1.5;
}

.msw-tips__list li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .msw-pet-ownership {
        padding: 0;
    }
    
    .msw-form-section,
    .msw-calc-actions,
    .msw-pet-option,
    #msw-pet-details,
    .msw-button-remove {
        display: none !important;
    }
    
    .msw-pets-list,
    .msw-results {
        border-color: #333 !important;
        break-inside: avoid;
    }
    
    .msw-result-card--primary {
        background: #EEEEEE !important;
        color: #333 !important;
    }
    
    .msw-result-card--primary .msw-result-card__label,
    .msw-result-card--primary .msw-result-card__value,
    .msw-result-card--primary .msw-result-card__note {
        color: #333333 !important;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .msw-pet-ownership {
        padding: 20px 15px;
    }
    
    .msw-calculator__title {
        font-size: 28px;
    }
    
    .msw-calculator__subtitle {
        font-size: 18px;
    }
    
    .msw-pet-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .msw-form-section {
        padding: 20px;
    }
    
    .msw-results-grid {
        grid-template-columns: 1fr;
    }
    
    .msw-result-card__value {
        font-size: 28px;
    }
    
    .msw-pet-card__costs {
        grid-template-columns: 1fr;
    }
    
    .msw-pet-breakdown__grid {
        grid-template-columns: 1fr;
    }
    
    .msw-breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .msw-calc-actions {
        flex-direction: column;
    }
    
    .msw-calc-actions .msw-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .msw-pet-selector {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-contrast: high) {
    .msw-form-select,
    .msw-form-input,
    .msw-pet-option {
        border-width: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 3px solid #D4925A;
    outline-offset: 2px;
}

.msw-sr-only {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
