/* Seletor de Serviços - Dropdown e Modal */

/* ===== HEADER SELECTOR ===== */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.header-top h1 {
    margin: 0;
    flex: 1;
    min-width: 300px;
}

.header-selector {
    position: relative;
    display: flex;
    align-items: center;
}

.servico-dropdown-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.servico-dropdown-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.servico-dropdown-btn:active {
    transform: translateY(0);
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.servico-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* ===== DROPDOWN MENU ===== */
.servico-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    min-width: 280px;
    margin-top: 8px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.servico-dropdown.hidden {
    display: none;
}

/* Overlay para mobile quando dropdown está aberto */
@media (max-width: 768px) {
    .servico-dropdown-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1999;
        display: none;
    }

    .servico-dropdown-overlay.active {
        display: block;
    }
}

.dropdown-item {
    padding: 14px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.dropdown-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.active {
    background-color: #f0f3ff;
    border-left-color: #667eea;
    font-weight: 600;
    color: #667eea;
}

.dropdown-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dropdown-item.disabled:hover {
    background-color: white;
}

.dropdown-item-icon {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
}

.dropdown-item-content {
    flex: 1;
}

.dropdown-item-name {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.dropdown-item-status {
    display: block;
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.dropdown-item.active .dropdown-item-status {
    color: #667eea;
}

.dropdown-item.disabled .dropdown-item-status {
    color: #ff9500;
}

/* ===== SELECTOR MODAL ===== */
.selector-modal-content {
    max-width: 500px;
    border-radius: 12px;
}

.selector-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px 12px 0 0;
}

.selector-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.selector-modal-body {
    padding: 30px;
}

.selector-info {
    margin-bottom: 28px;
    text-align: center;
}

.selector-info h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
}

.selector-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ===== SERVIÇOS LIST ===== */
.servicos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.servico-card {
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
}

.servico-card:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
    transform: translateX(4px);
}

.servico-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-width: 2px;
}

.servico-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.servico-card.disabled:hover {
    border-color: #e0e0e0;
    background-color: #f8f8f8;
    transform: none;
}

.servico-card-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.servico-card-info {
    flex: 1;
}

.servico-card-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin: 0 0 4px 0;
}

.servico-card-status {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.servico-card-status.active {
    color: #22c55e;
    font-weight: 500;
}

.servico-card-status.emBreve {
    color: #ff9500;
    font-weight: 500;
}

.servico-card-check {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

.servico-card.selected .servico-card-check {
    background: #667eea;
    border-color: #667eea;
}

/* ===== MODAL ACTIONS ===== */
.selector-modal-actions {
    padding: 0 30px 30px 30px;
}

.btn-primary {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== FOOTER BUTTON ===== */
.footer-services {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px !important;
}

.btn-services-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-services-footer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ===== MOBILE RESPONSIVO ===== */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .header-top h1 {
        min-width: auto;
    }

    .servico-dropdown-btn {
        width: 100%;
        justify-content: space-between;
    }

    .servico-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        bottom: auto;
        min-width: auto;
        width: 100vw;
        margin-left: calc(-100vw / 2 + 50%);
        max-height: 50vh;
        border-radius: 8px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        margin-top: 8px;
        overflow-y: auto;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
        animation: slideDown 0.3s ease;
        z-index: 2000;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .selector-modal-content {
        max-width: 100%;
        border-radius: 8px;
    }

    .selector-modal-body {
        padding: 20px;
    }

    .selector-modal-actions {
        padding: 0 20px 20px 20px;
    }

    .servico-card {
        padding: 12px;
        gap: 10px;
    }

    .servico-card-icon {
        font-size: 24px;
        min-width: 32px;
    }

    .servico-card-name {
        font-size: 15px;
    }

    .selector-info h3 {
        font-size: 16px;
    }

    .selector-modal-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header-top h1 {
        font-size: 18px;
    }

    .servico-dropdown-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .dropdown-item {
        padding: 12px 12px;
        font-size: 13px;
    }

    .servico-card-name {
        font-size: 14px;
    }
}
