/* Daily Card Fixes and Enhancements */

/* Card quick action buttons */
.card-quick-actions {
    position: absolute;
    bottom: 30px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image-container {
    position: relative;
}

.yoga-card:hover .card-quick-actions {
    opacity: 1;
}

.btn-card-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.btn-card-action:hover {
    transform: scale(1.1);
    background-color: white;
}

/* Daily card container enhancements */
.daily-card-container {
    max-width: 360px;
    margin: 0 auto;
    margin-top: -30px; /* Move the card higher on the page */
    position: relative;
    z-index: 10; /* Ensure card is above other elements */
}

.daily-card-info {
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    background-color: rgba(30, 30, 50, 0.85); /* Slightly more opaque background */
}

.daily-card-info:hover {
    transform: translateY(-5px);
}

.daily-card-significance {
    background-color: rgba(30, 30, 50, 0.5);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.significance-text {
    font-style: italic;
    color: #e0e0e0;
    margin-bottom: 0;
}

.daily-card-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Staked card notification */
.staked-card-note {
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 10px;
}

/* Badge styling */
.owned-badge {
    background-color: rgba(0, 128, 0, 0.8);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.staked-badge {
    background-color: rgba(218, 165, 32, 0.8);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* iPad specific fixes */
@media only screen 
and (min-device-width: 768px) 
and (max-device-width: 1024px),
only screen 
and (min-width: 768px) 
and (max-width: 1024px) {
    /* Card positioning fixes */
    .daily-card-container {
        max-width: 320px; /* Slightly smaller for better positioning */
        margin-top: -10px !important; /* Adjust positioning based on screenshot */
        padding-bottom: 20px;
    }
    
    .today-card-header {
        margin-top: -20px;
        text-align: center;
    }
    
    .daily-card-info {
        margin-top: 15px;
    }
    
    /* Create a more centered, compact layout for iPad */
    .container-fluid {
        padding: 0 15px;
    }
    
    /* Main content area spacing */
    .content-wrapper {
        padding-top: 10px;
    }
    
    /* Center align cards in the main view */
    .card-wrapper {
        display: flex;
        justify-content: center;
    }
    
    /* Ensure buttons are more visible */
    .card-quick-actions {
        opacity: 0.9; /* More visible on iPad */
        bottom: 40px;
        right: 15px;
    }
    
    .btn-card-action {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    /* Make buttons in footer more visible and clickable */
    .daily-card-info .btn-group .btn {
        padding: 10px 15px;
        font-size: 14px; /* Slightly smaller font for more compact buttons */
    }
    
    /* Get Started section fixes */
    .col-lg-6 .page-section .card {
        width: 100%; /* Make cards take full width */
        min-height: unset; /* Allow natural height */
    }
    
    /* Ensure all cards in get started section have proper width */
    .col-lg-6 {
        width: 100%;
        padding: 0 20px;
    }
    
    /* Card grid in homepage - make more flexible */
    .row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Text content in cards shouldn't be squished */
    .card-text {
        width: 100%;
        max-width: 100%;
        font-size: 0.9rem; /* Slightly smaller text for iPad */
    }
    
    /* More compact section headers */
    .section-header h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    /* Make main CTA buttons more compact but still visible */
    .main-cta {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* iPad Pro (12.9") specific adjustments */
@media only screen 
and (min-device-width: 1024px) 
and (max-device-width: 1366px) 
and (-webkit-min-device-pixel-ratio: 2) {
    .daily-card-container {
        max-width: 340px;
        margin-top: -15px !important; /* Adjust positioning based on screenshot */
    }
    
    .today-card-header {
        margin-top: -25px;
    }
    
    /* Ensure layout works well on iPad Pro */
    .row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Make columns more responsive */
    .col-lg-6 {
        width: 50%;
        padding: 0 15px;
    }
    
    /* Get Started section should be wider */
    .col-lg-6 .page-section .card {
        width: 100%;
        min-height: unset;
    }
    
    /* Make text in cards more readable */
    .card-text {
        max-width: 100%;
        font-size: 0.95rem;
    }
    
    /* Buttons should be more touch-friendly but compact */
    .btn {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* Mobile responsive fixes */
@media (max-width: 767px) {
    .daily-card-container {
        max-width: 280px;
        margin-top: -40px; /* Move the card even higher on mobile */
    }
    
    .card-quick-actions {
        opacity: 1; /* Always visible on mobile */
        flex-direction: row;
        right: 50%;
        transform: translateX(50%);
        bottom: 50px;
    }
    
    .btn-card-action {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .daily-card-info .card-body {
        padding: 15px 10px;
    }
    
    .daily-card-info .card-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .daily-card-info .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .daily-card-info .btn-group .btn {
        margin: 5px 0 !important;
    }
}