/* Alegra Integration Styles */

.alegra-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #28a745;
}

.alegra-notification.error {
    border-left-color: #dc3545;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    gap: 15px;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    background: #28a745;
}

.alegra-notification.error .notification-icon {
    background: #dc3545;
}

.notification-text {
    flex: 1;
}

.notification-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.notification-text p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.notification-text small {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f8f9fa;
    color: #666;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Alegra Configuration Panel Styles */
.alegra-config-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.alegra-config-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alegra-config-title i {
    color: #007bff;
}

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

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

.alegra-form-group input,
.alegra-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.alegra-form-group input:focus,
.alegra-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.alegra-test-button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.alegra-test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.alegra-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alegra-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alegra-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alegra-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Invoice Preview Styles */
.invoice-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.invoice-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.invoice-company {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.invoice-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.invoice-items {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.invoice-items th,
.invoice-items td {
    border: 1px solid #333;
    padding: 8px;
    text-align: left;
}

.invoice-items th {
    background: #333;
    color: white;
    font-weight: bold;
}

.invoice-total {
    text-align: right;
    font-weight: bold;
    font-size: 14px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #333;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .alegra-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .alegra-config-panel {
        padding: 20px;
        margin: 10px;
    }
    
    .invoice-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .invoice-items {
        font-size: 10px;
    }
    
    .invoice-items th,
    .invoice-items td {
        padding: 4px;
    }
}
