/**
 * Estilos do Plugin PDV Waiter Call
 */

/* ===================================
   BOTÃO DO CLIENTE
   =================================== */

.pdv-wc-customer-wrapper {
    display: inline-block;
    margin: 10px 0;
}

.pdv-wc-call-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pdv-wc-call-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.pdv-wc-call-button:active {
    transform: translateY(0);
}

.pdv-wc-bell-icon {
    font-size: 24px;
    animation: pdv-wc-bell-swing 1s ease-in-out infinite;
}

@keyframes pdv-wc-bell-swing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* ===================================
   MODAL
   =================================== */

.pdv-wc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.pdv-wc-modal-content {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: pdv-wc-modal-slide-in 0.3s ease;
}

@keyframes pdv-wc-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdv-wc-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.pdv-wc-modal-close:hover {
    color: #333;
}

.pdv-wc-modal h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.pdv-wc-form-group {
    margin-bottom: 20px;
}

.pdv-wc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.pdv-wc-input,
.pdv-wc-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.pdv-wc-input:focus,
.pdv-wc-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.pdv-wc-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.pdv-wc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pdv-wc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

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

.pdv-wc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pdv-wc-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.pdv-wc-btn-secondary:hover {
    background: #e0e0e0;
}

.pdv-wc-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
}

.pdv-wc-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pdv-wc-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===================================
   PAINEL DO GARÇOM
   =================================== */

.pdv-wc-waiter-panel {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pdv-wc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.pdv-wc-panel-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.pdv-wc-bell-container {
    position: relative;
}

.pdv-wc-bell-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
}

.pdv-wc-bell-button:hover {
    transform: scale(1.1);
}

.pdv-wc-bell-icon-lg {
    font-size: 32px;
}

.pdv-wc-bell-ringing {
    animation: pdv-wc-ring 0.5s ease-in-out infinite;
}

@keyframes pdv-wc-ring {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.1); }
    50% { transform: rotate(15deg) scale(1.1); }
    75% { transform: rotate(-15deg) scale(1.1); }
}

.pdv-wc-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pdv-wc-pulse 1s ease-in-out infinite;
}

@keyframes pdv-wc-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.pdv-wc-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.pdv-wc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.pdv-wc-status-active {
    background: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    animation: pdv-wc-blink 2s ease-in-out infinite;
}

.pdv-wc-status-inactive {
    background: #999;
}

@keyframes pdv-wc-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===================================
   LISTA DE CHAMADAS
   =================================== */

.pdv-wc-calls-list {
    min-height: 300px;
    margin-bottom: 20px;
}

.pdv-wc-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.pdv-wc-empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 15px;
}

.pdv-wc-call-item {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.pdv-wc-call-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pdv-wc-call-warning {
    border-color: #ffa726;
    background: #fff8e1;
}

.pdv-wc-call-urgent {
    border-color: #ef5350;
    background: #ffebee;
    animation: pdv-wc-urgent-pulse 2s ease-in-out infinite;
}

@keyframes pdv-wc-urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(239, 83, 80, 0.4); }
    50% { box-shadow: 0 0 20px rgba(239, 83, 80, 0.6); }
}

.pdv-wc-call-attended {
    opacity: 0.5;
    transform: scale(0.95);
}

.pdv-wc-call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pdv-wc-call-mesa {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.pdv-wc-mesa-icon {
    font-size: 24px;
}

.pdv-wc-call-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #666;
    background: #fff;
    padding: 8px 15px;
    border-radius: 20px;
}

.pdv-wc-call-body {
    margin-bottom: 15px;
    color: #666;
}

.pdv-wc-call-timestamp {
    font-size: 14px;
    margin-bottom: 5px;
}

.pdv-wc-call-obs {
    font-size: 14px;
    margin-top: 5px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.pdv-wc-call-actions {
    display: flex;
    gap: 10px;
}

.pdv-wc-btn-success {
    background: #4caf50;
    color: #fff;
    flex: 1;
}

.pdv-wc-btn-success:hover:not(:disabled) {
    background: #45a049;
}

.pdv-wc-btn-danger {
    background: #f44336;
    color: #fff;
    flex: 1;
}

.pdv-wc-btn-danger:hover:not(:disabled) {
    background: #da190b;
}

/* ===================================
   ESTATÍSTICAS
   =================================== */

.pdv-wc-statistics {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 12px;
    margin-bottom: 20px;
}

.pdv-wc-stat-item {
    flex: 1;
    text-align: center;
}

.pdv-wc-stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.pdv-wc-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* ===================================
   CONTROLES
   =================================== */

.pdv-wc-panel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.pdv-wc-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.pdv-wc-rotating {
    animation: pdv-wc-rotate 0.5s linear;
}

@keyframes pdv-wc-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pdv-wc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.pdv-wc-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.pdv-wc-toggle-label {
    font-size: 14px;
    color: #666;
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

@media (max-width: 768px) {
    .pdv-wc-panel-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pdv-wc-statistics {
        flex-direction: column;
    }
    
    .pdv-wc-call-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .pdv-wc-call-actions {
        flex-direction: column;
    }
    
    .pdv-wc-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .pdv-wc-panel-controls {
        flex-direction: column;
        gap: 15px;
    }
}
