/* Share Notes Styles */
.upw-note-btn-share {
    color: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
}

.upw-note-btn-share:hover {
    background: #f5f3ff !important;
}

.upw-note-shared-badge {
    display: inline-block !important;
    background: #8b5cf6 !important;
    color: white !important;
    font-size: 10px !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    margin-left: 8px !important;
}

.upw-share-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
}

.upw-share-modal-content {
    background: white !important;
    border-radius: 12px !important;
    padding: 24px !important;
    max-width: 500px !important;
    width: 90% !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

.upw-share-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.upw-share-modal-header h3 {
    margin: 0 !important;
    color: #1e3a8a !important;
    font-size: 18px !important;
}

.upw-share-modal-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.upw-share-modal-close:hover {
    color: #374151 !important;
}

.upw-share-email-input-container {
    margin-bottom: 16px !important;
}

.upw-share-email-input-container label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
}

.upw-share-email-input {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease !important;
}

.upw-share-email-input:focus {
    outline: none !important;
    border-color: #8b5cf6 !important;
}

.upw-share-email-input.error {
    border-color: #ef4444 !important;
}

.upw-share-email-error {
    display: none !important;
    color: #ef4444 !important;
    font-size: 12px !important;
    margin-top: 4px !important;
}

.upw-share-email-error.show {
    display: block !important;
}

.upw-share-email-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    min-height: 40px !important;
    padding: 8px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    background: #f9fafb !important;
}

.upw-share-email-tags:empty {
    display: none !important;
}

.upw-share-email-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #8b5cf6 !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 16px !important;
    font-size: 13px !important;
}

.upw-share-email-tag-remove {
    background: none !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    font-size: 16px !important;
    line-height: 1 !important;
    padding: 0 !important;
    opacity: 0.8 !important;
}

.upw-share-email-tag-remove:hover {
    opacity: 1 !important;
}

.upw-share-hint {
    font-size: 12px !important;
    color: #6b7280 !important;
    margin-bottom: 16px !important;
}

.upw-share-modal-actions {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.upw-share-btn-cancel {
    padding: 8px 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    background: white !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

.upw-share-btn-cancel:hover {
    background: #f9fafb !important;
}

.upw-share-btn-confirm {
    padding: 8px 16px !important;
    border: 1px solid #8b5cf6 !important;
    border-radius: 6px !important;
    background: #8b5cf6 !important;
    color: white !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

.upw-share-btn-confirm:hover {
    background: #7c3aed !important;
}

.upw-share-btn-confirm:disabled {
    background: #d1d5db !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
}

.upw-share-notification {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: #10b981 !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    z-index: 10001 !important;
    animation: slideInRight 0.3s ease !important;
}

.upw-share-notification.error {
    background: #ef4444 !important;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) !important;
        opacity: 0 !important;
    }
    to {
        transform: translateX(0) !important;
        opacity: 1 !important;
    }
}

.upw-received-notes-section {
    background: rgba(139, 92, 246, 0.05) !important;
    border: 1px solid #8b5cf6 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-top: 16px !important;
}

.upw-received-notes-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.upw-received-notes-header h4 {
    margin: 0 !important;
    font-size: 16px !important;
    color: #8b5cf6 !important;
}

.upw-received-note-from {
    font-size: 11px !important;
    color: #8b5cf6 !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
}

/* Notes Section Styles - Modern Card Grid */
.upw-notes-section {
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 30px 0 !important;
    margin-top: 30px !important;
    box-shadow: none !important;
}

.upw-notes-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 30px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.upw-notes-header h3 {
    margin: 0 !important;
    font-size: 42px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
}

.upw-notes-count {
    font-size: 16px !important;
    color: #4a5568 !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    opacity: 0.7 !important;
}

.upw-notes-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 24px !important;
}

.upw-note-item {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 32px !important;
    min-height: 240px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    position: relative !important;
}

.upw-note-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

/* Color variations for notes - randomly assigned */
.upw-note-item:nth-child(6n+1) {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%) !important;
}

.upw-note-item:nth-child(6n+2) {
    background: linear-gradient(135deg, #fbc2eb 0%, #ff8787 100%) !important;
}

.upw-note-item:nth-child(6n+3) {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%) !important;
}

.upw-note-item:nth-child(6n+4) {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%) !important;
}

.upw-note-item:nth-child(6n+5) {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%) !important;
}

.upw-note-item:nth-child(6n+6) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
}

.upw-note-header {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    margin-bottom: 12px !important;
    flex: 1 !important;
}

.upw-note-title-date {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

.upw-note-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #2d3748 !important;
    margin-bottom: 0 !important;
}

.upw-note-date {
    font-size: 13px !important;
    color: #4a5568 !important;
    font-weight: 500 !important;
}

.upw-note-content {
    display: block !important;
    font-size: 14px !important;
    color: #2d3748 !important;
    line-height: 1.5 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    margin-bottom: 12px !important;
    flex: 1 !important;
}

.upw-note-actions {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: auto !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(45, 55, 72, 0.1) !important;
}

.upw-note-btn {
    padding: 8px 14px !important;
    border: none !important;
    border-radius: 8px !important;
    background: rgba(45, 55, 72, 0.9) !important;
    color: white !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.upw-note-btn:hover {
    background: rgba(45, 55, 72, 1) !important;
    transform: translateY(-2px) !important;
}

.upw-note-btn-edit,
.upw-note-btn-delete,
.upw-note-btn-name,
.upw-note-btn-share {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.upw-note-btn-edit:hover,
.upw-note-btn-delete:hover,
.upw-note-btn-name:hover,
.upw-note-btn-share:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.upw-notes-empty {
    text-align: center !important;
    padding: 60px 30px !important;
    color: #9ca3af !important;
    font-size: 16px !important;
    grid-column: 1 / -1 !important;
}

/* Save button in toolbar */
.upw-save {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

.upw-save:hover:not(:disabled) {
    background: #059669 !important;
    border-color: #059669 !important;
}

/* Shared note badge */
.upw-note-shared-badge {
    display: inline-block !important;
    background: rgba(139, 92, 246, 0.9) !important;
    color: white !important;
    font-size: 10px !important;
    padding: 3px 8px !important;
    border-radius: 10px !important;
    margin-left: 8px !important;
}

.upw-received-note-from {
    font-size: 11px !important;
    color: #4a5568 !important;
    font-weight: 500 !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(45, 55, 72, 0.1) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .upw-notes-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 16px !important;
    }
    
    .upw-note-item {
        padding: 28px !important;
        min-height: 220px !important;
    }
    
    .upw-notes-header h3 {
        font-size: 32px !important;
    }
}

@media (max-width: 480px) {
    .upw-notes-list {
        grid-template-columns: 1fr !important;
    }
}