/**
 * Estilos do Services Add-on - DPS
 * 
 * Estilos responsivos e minimalistas para campos de serviços
 * injetados no formulário de agendamento.
 * 
 * @package DesiPetShower
 * @subpackage ServicesAddon
 * @since 1.0.0
 */

/* === Inputs de Preço de Serviços === */
.dps-service-price-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.dps-service-price {
    width: 120px;
    max-width: 100%;
    min-width: 88px;
    box-sizing: border-box;
    padding: 4px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
    text-align: left;
    transition: border-color 0.2s ease;
}

.dps-service-price:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.dps-service-price:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* === Checkboxes de Serviços === */
.dps-service-checkbox {
    margin-right: 8px;
    cursor: pointer;
}

/* === Badges de Status === */
.dps-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dps-badge-active {
    background: #d1fae5;
    color: #059669;
}

.dps-badge-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* === Tabela de Serviços === */
.dps-services-table {
    width: 100%;
    border-collapse: collapse;
}

.dps-services-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.dps-services-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.dps-services-table tbody tr:hover {
    background: #f9fafb;
}

.dps-services-table td a {
    color: #0ea5e9;
    text-decoration: none;
}

.dps-services-table td a:hover {
    text-decoration: underline;
}

/* === Layout Responsivo === */

/* Tablets e telas médias (até 768px) */
@media (max-width: 768px) {
    .dps-service-price {
        width: 110px;
        font-size: 15px; /* Ligeiramente maior para mobile */
    }
    
    /* Tabela responsiva - ocultar colunas de categoria e preço em tablet */
    .dps-services-table .dps-col-category,
    .dps-services-table .dps-col-price {
        display: none;
    }
}

/* Mobile (até 480px) */
@media (max-width: 480px) {
    .dps-service-price-wrapper {
        gap: 4px;
    }

    .dps-service-price {
        width: 90px;
        min-width: 70px;
        max-width: 110px;
        font-size: 16px; /* Evita zoom automático no iOS */
        padding: 6px 8px;
    }
    
    /* Labels de serviços em mobile */
    .dps-services-fields label {
        display: block;
        padding: 8px 0;
    }
    
    /* Tabela mais compacta */
    .dps-services-table th,
    .dps-services-table td {
        padding: 8px;
        font-size: 13px;
    }
    
    /* Ocultar coluna de tipo em mobile pequeno */
    .dps-services-table .dps-col-type {
        display: none;
    }
}

/* Mobile pequeno (até 375px) */
@media (max-width: 375px) {
    .dps-service-price {
        width: 80px;
        min-width: 60px;
        max-width: 90px;
    }
}

/* === Fieldset de Serviços === */
.dps-services-fields {
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.dps-services-fields legend {
    font-weight: 600;
    color: #374151;
    padding: 0 8px;
    font-size: 16px;
}

.dps-services-fields p {
    margin: 8px 0;
}

.dps-services-fields strong {
    color: #374151;
    font-size: 14px;
    display: block;
    margin: 12px 0 8px 0;
}

/* === Campos de Extras === */
#dps-simple-extra-fields,
#dps-subscription-extra-fields {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

#dps-simple-extra-value,
#dps-subscription-extra-value {
    width: 100px;
    max-width: 100%;
}

/* === Campo de Total === */
#dps-appointment-total,
#dps-subscription-total {
    font-weight: 600;
    color: #0ea5e9;
    font-size: 16px;
    background: #f9fafb;
}

@media (max-width: 480px) {
    #dps-appointment-total,
    #dps-subscription-total {
        width: 100%;
        max-width: 200px;
        font-size: 18px;
        padding: 8px;
    }
}

/* === Formulário de Cadastro de Serviços === */
.dps-price-by-size,
.dps-duration-by-size {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.dps-price-by-size p:first-of-type,
.dps-duration-by-size p:first-of-type {
    margin-top: 0;
}

.dps-stock-consumption {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

#dps-stock-consumption-table {
    margin-top: 12px;
}

#dps-stock-consumption-table th {
    background: #f9fafb;
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
}

#dps-stock-consumption-table td {
    padding: 8px 12px;
}

#dps-stock-consumption-table select,
#dps-stock-consumption-table input[type="number"] {
    width: 100%;
    max-width: 200px;
}
