/**
 * OrdinalNews Calendar Button Styles
 * Styling for the Add to Calendar button that appears on hover
 */

.ordinalnews-calendar-button-container {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 20;
    pointer-events: none;
    padding: 0 15px;
}

/* All cards should have the same styling */
.ordinalnews-card {
    position: relative;
    overflow: hidden !important; /* Keep overflow hidden to maintain border radius */
    border-radius: 10px; /* Ensure border radius is maintained */
    height: auto; /* Let height be determined by content */
}

/* Individual card transitions */
.ordinalnews-card .ordinalnews-card-content {
    position: relative;
    padding: 20px 15px 15px !important; /* Normal padding in default state */
    transition: padding-bottom 0.3s ease-out;
    /* Fixed height layout to prevent affecting other cards */
    height: auto;
}

/* When hovered, expand only the current card's content padding */
.ordinalnews-card:not(.expired):not(.no-date):hover .ordinalnews-card-content {
    padding-bottom: 60px !important; /* Expanded padding on hover */
}

/* Container for all cards */
.ordinalnews-cards-grid {
    display: grid;
    align-items: start !important; /* Force alignment to top */
    grid-auto-rows: auto !important; /* Let rows size naturally */
}

.ordinalnews-card:not(.expired):not(.no-date):hover .ordinalnews-calendar-button-container {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Specifically prevent hover effects on expired and TBA cards */
.ordinalnews-card.expired:hover .ordinalnews-card-content,
.ordinalnews-card.no-date:hover .ordinalnews-card-content {
    padding-bottom: 15px !important; /* Keep the original padding */
}

.ordinalnews-calendar-button {
    background-color: #FF6B00;
    color: #ffffff !important;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    max-width: 200px;
}

.ordinalnews-calendar-button:hover {
    background-color: #ff8a20;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.ordinalnews-calendar-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ordinalnews-calendar-button .calendar-icon {
    margin-right: 5px;
    width: 16px;
    height: 16px;
}

/* Only show on upcoming and premium cards with dates */
.ordinalnews-card.expired .ordinalnews-calendar-button-container,
.ordinalnews-card.no-date .ordinalnews-calendar-button-container {
    display: none;
}

/* Make sure the button appears above the card overlay link */
.ordinalnews-card-overlay-link {
    z-index: 10 !important;
}

.ordinalnews-calendar-button {
    position: relative;
    z-index: 30 !important; /* Always on top */
}

/* Ensure premium effects stay within the card */
.premium-border-static,
.premium-shine-effect {
    overflow: hidden !important;
}

/* Responsive adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .ordinalnews-card .ordinalnews-card-content {
        padding: 15px 12px 15px !important; /* Match existing responsive styling */
    }
    
    .ordinalnews-card:not(.expired):not(.no-date):hover .ordinalnews-card-content {
        padding-bottom: 55px !important;
    }
    
    .ordinalnews-calendar-button {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .ordinalnews-calendar-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .ordinalnews-card:not(.expired):not(.no-date):hover .ordinalnews-card-content {
        padding-bottom: 50px !important;
    }
} 