/**
 * Product Purchase Notice Styles
 * Modern, responsive styling for purchase notices
 */

/* Base Notice Container */
.ppn-notice-container {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Notice Header */
.ppn-notice-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
}

.ppn-notice-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Notice Body */
.ppn-notice-body {
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.ppn-notice-body p {
    margin: 0 0 10px 0;
}

.ppn-notice-body p:last-child {
    margin-bottom: 0;
}

/* Notice Types */
.ppn-notice-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
}

.ppn-notice-info .ppn-notice-header {
    color: #1976d2;
}

.ppn-notice-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid #ff9800;
}

.ppn-notice-warning .ppn-notice-header {
    color: #f57c00;
}

.ppn-notice-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #4caf50;
}

.ppn-notice-success .ppn-notice-header {
    color: #388e3c;
}

.ppn-notice-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #f44336;
}

.ppn-notice-danger .ppn-notice-header {
    color: #d32f2f;
}

/* Confirmation Checkbox */
.ppn-confirmation-wrapper {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.ppn-confirmation-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.ppn-confirmation-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: currentColor;
}

.ppn-confirmation-text {
    color: #333;
    font-weight: 500;
}

/* Error States */
.ppn-notice-error {
    border: 2px solid #f44336;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.ppn-error-message {
    color: #f44336;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ppn-notice-container {
        margin: 15px 0;
        border-radius: 6px;
    }
    
    .ppn-notice-header {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .ppn-notice-body {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .ppn-confirmation-wrapper {
        margin-top: 12px;
        padding-top: 12px;
    }
}

/* Accessibility */
.ppn-notice-container:focus-within {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.ppn-confirmation-checkbox:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ppn-notice-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .ppn-confirmation-checkbox {
        -webkit-appearance: checkbox;
        appearance: checkbox;
    }
}

/* Dark Mode Support (for future use) */
@media (prefers-color-scheme: dark) {
    .ppn-notice-body {
        color: #e0e0e0;
    }
    
    .ppn-confirmation-text {
        color: #e0e0e0;
    }
}

/* Animation for notice appearance */
.ppn-notice-container {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Loading State */
.ppn-notice-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Multiple Notices Container */
.ppn-notices-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ppn-notices-wrapper .ppn-notice-container:last-child {
    margin-bottom: 0;
}

/* Custom Scrollbar for long messages */
.ppn-notice-body {
    max-height: 300px;
    overflow-y: auto;
}

.ppn-notice-body::-webkit-scrollbar {
    width: 8px;
}

.ppn-notice-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.ppn-notice-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.ppn-notice-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}
