/* Button "Saved greetings" in header */
.saved-greetings-header-btn {
    background: linear-gradient(to right, #FE4F70 0%, #FFA387 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
    font-size: 20px;
    width: 40px;
    height: 40px;
    position: relative;
    margin-right: 10px;
    padding: 0; /* Ensure no extra padding */
    z-index: 1001; /* Ensure it's above other elements */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.saved-greetings-header-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.saved-greetings-header-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(254, 79, 112, 0.5);
}

/* Perfect icon alignment for both buttons */
.saved-greetings-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.saved-greetings-header-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    -webkit-transform: none;
    transform: none;
    font-size: inherit;
}

.burger-menu.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 40px;
    width: 40px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

/* Counter for saved greetings */
.saved-greetings-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    animation: pulse 5s infinite;
    z-index: 1003; /* Ensure counter is above other elements */
    font-family: Arial, sans-serif; /* Use a more standard font for numbers */
}

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

/* Button "Add to saved" */
.save-greeting-btn {
    background: none;
    border: none;
    /*color: #9faabb !important;*/
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.save-greeting-btn:hover {
    background-color: #f8f9fa;
    color: #FE4F70;
}

.save-greeting-btn.saved {
    color: #28a745;
}

/* Button "Add to saved" - active state */
.save-greeting-btn.saved-greeting-active {
    color: #FE4F70;
}

.save-greeting-btn.saved-greeting-active:hover {
    background-color: #f8f9fa;
    color: #ff0000;
}

/* Visual indication of posts that are saved */
.modern-post-card.saved-greeting-highlight {
    border-left: 4px solid #FE4F70;
    background-color: rgba(254, 79, 112, 0.05);
}

/* Styles for saved greetings modal */
.saved-greetings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.saved-greetings-modal-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    width: 800px;
}

.saved-greetings-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-greetings-modal-header h2 {
    margin: 0;
    color: #192c48;
    font-size: 24px;
}

.saved-greetings-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9faabb;
}

.saved-greetings-modal-body {
    padding: 20px;
}

.saved-greetings-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9faabb;
}

.saved-greetings-list {
    display: block;
}

.saved-greetings-section {
    margin-bottom: 30px;
}

.saved-greetings-section-title {
    font-size: 20px;
    color: #192c48;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FE4F70;
}

.saved-greetings-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.saved-greeting-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    position: relative;
}

.saved-greeting-category {
    font-size: 12px;
    color: #FE4F70;
    margin-bottom: 5px;
}

.saved-greeting-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #192c48;
}

.saved-greetings-content {
    font-size: 14px;
    color: #6c6c6c;
    margin-bottom: 15px;
    line-height: 1.5;
}

.saved-greeting-actions {
    display: flex;
    justify-content: space-between;
}

.saved-greeting-remove {
    background: none;
    border: none;
    color: #FE4F70;
    cursor: pointer;
    font-size: 14px;
}

.saved-greeting-remove:hover {
    text-decoration: underline;
}

.saved-greeting-compare {
    background: linear-gradient(to right, #FE4F70 0%, #FFA387 100%);
    border: none;
    border-radius: 4px;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.saved-greeting-compare:hover {
    opacity: 0.9;
}

    /* Button container alignment */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Specific styles for our saved greetings button */
.saved-greetings-header-btn {
    background: linear-gradient(to right, #FE4F70 0%, #FFA387 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
    font-size: 20px;
    width: 40px;
    height: 40px;
    position: relative;
    margin: 0;
    padding: 0;
    z-index: 1001;
}

.saved-greetings-header-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Fix vertical alignment only, preserving all other styles */
.saved-greetings-header-btn,
.burger-menu.icon-button {
    vertical-align: middle !important;
    -webkit-transform: translateY(0) !important;
    transform: translateY(0) !important;
    display: inline-block !important;
    height: 40px !important;
    width: 40px !important;
    margin: 7px !important;
    padding: 0 !important;
    position: relative !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .saved-greetings-header-btn,
    .burger-menu.icon-button {
        height: 35px !important;
        width: 35px !important;
    }
    
    button.burger-menu.icon-button > span.burger-icon::before,
    button.burger-menu.icon-button > span.burger-icon::after {
        top: 50% !important;
        left: 50% !important;
        /*-webkit-transform: translate(-50%, -50%) !important;*/
        translate(-5%, 5%) !important;
    }
}

/* Responsive adjustments for icon alignment */
@media (max-width: 768px) {
    .saved-greetings-header-btn i {
        font-size: 16px;
    }
    
    .burger-menu.icon-button .burger-icon,
    .burger-menu.icon-button .burger-icon::before,
    .burger-menu.icon-button .burger-icon::after {
        width: 20px !important;
    }
    
    .saved-greetings-section-grid {
        grid-template-columns: 1fr;
    }
}