/* Card container styling */
.custom-card {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

/* Full-width header styling */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

/* Title and subtitle styling */
.title-section {
    flex-grow: 1;
}

.card-title {
    font-size: 1.2rem;
    margin: 0;
    color:#333;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Corner text styling */
.corner-text {
    font-size: 0.8rem;
    color: #333;
    font-weight: bold;
}

/* Context menu styling */
.context-menu {
    font-size: 1.2rem;
    cursor: pointer;
}

/* Icon and Information Grid */
.card-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* Icon image styling */
.icon-image, .icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-color: #b0c4de;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Information grid styling */
.info-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.info-left, .info-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 45%; /* Ensure minimum width */
    max-width: 50%; /* Limit maximum width */
}

.info-left p, .info-right p {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap; /* Prevent text wrapping within each paragraph */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis for overflow text */
    max-width: 100%; /* Ensure text doesn't overflow its container */
}

/* Card footer for buttons spread out all over the card*/
.card-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: space-between;
}

.status-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Ensures contents align to the left */
    justify-content: flex-start; /* Ensures the container starts at the top-left */
    color: #333;
    font-size: 0.8rem;
    margin: 0; /* Removes any default margin */
    padding: 0; /* Removes any default padding */
    text-align: left; /* Ensures text aligns to the left */
    width: auto; /* Ensures it does not stretch unnecessarily */
}

/* Context menu icon */
.context-menu {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}

/* Context menu box */
.context-menu-box {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 150px;
    z-index: 10;
}

.context-menu-box p {
    margin: 0;
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.context-menu-box p:hover {
    background-color: #f0f0f0;
}

/* Show context menu when toggle class is active */
.context-menu-box.show {
    display: block;
}

/* Hover Effect */
.custom-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

/* Selected State */
.custom-card.selected {
    border: 2px solid #001c3a; /* Highlight border */
    background-color: #e7f1ff; /* Light blue background */
}

/* Dragging Effect */
.custom-card.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    z-index: 1000;
    position: relative;
}

/* Modern Checkbox Styling */
.modern-checkbox-container {
    position: relative;
    display: inline-block;
    margin-right: 1em;
    cursor: pointer;
}

.modern-checkbox {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.modern-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkmark:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transform: scale(1.05);
}

/* Checked state */
.modern-checkbox:checked + .modern-checkbox-label .checkmark {
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

/* Checkmark symbol */
.modern-checkbox:checked + .modern-checkbox-label .checkmark::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 1;
    transition: opacity 0.2s ease;
}

.checkmark::after {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Focus state for accessibility */
.modern-checkbox:focus + .modern-checkbox-label .checkmark {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .info-container {
        flex-direction: column;
    }
    
    .info-left, .info-right {
        max-width: 100%;
        min-width: 100%;
    }
    
    .icon-image, .icon {
        width: 60px;
        height: 60px;
    }
    
    /* Larger checkboxes on mobile for better touch targets */
    .checkmark {
        width: 28px;
        height: 28px;
    }
    
    .modern-checkbox:checked + .modern-checkbox-label .checkmark::after {
        left: 9px;
        top: 4px;
        width: 7px;
        height: 14px;
    }
}