/**
 * Action Cards Component Styles
 *
 * Visually prominent cards that guide users to their next actions.
 * Reduces cognitive load and improves discoverability.
 *
 * Version: 1.0
 * Date: February 9, 2026
 */

/* Container */
.action-cards-container {
    margin-bottom: 2rem;
}

.action-cards-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-cards-title i {
    color: #ffc107;
}

/* Grid */
.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .action-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.action-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.action-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.action-card.completed {
    background: #f8f9fa;
    border-color: #28a745;
}

.action-card.completed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #28a745;
}

/* Priority variations */
.action-card.action-card-primary {
    border-color: #0d6efd;
    background: linear-gradient(135deg, #ffffff 0%, #e7f3ff 100%);
}

.action-card.action-card-primary:hover {
    border-color: #0d6efd;
    background: linear-gradient(135deg, #e7f3ff 0%, #cce5ff 100%);
}

.action-card.action-card-secondary {
    border-color: #e9ecef;
}

.action-card.action-card-tertiary {
    border-color: #dee2e6;
    background: #f8f9fa;
}

/* Icon */
.action-card-icon {
    font-size: 2rem;
    color: #0d6efd;
    margin-bottom: 1rem;
    position: relative;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f3ff;
    border-radius: 0.5rem;
}

.action-card-primary .action-card-icon {
    background: #0d6efd;
    color: white;
}

.action-card-check {
    position: absolute;
    bottom: -0.25rem;
    right: -0.25rem;
    font-size: 1rem;
    color: #28a745;
    background: white;
    border-radius: 50%;
}

/* Content */
.action-card-content {
    flex: 1;
    margin-bottom: 1rem;
}

.action-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.action-card-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Stats */
.action-card-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.action-card-stat {
    font-size: 0.75rem;
    color: #6c757d;
}

.action-card-stat strong {
    display: block;
    font-size: 1.25rem;
    color: #212529;
    font-weight: 700;
}

/* Footer */
.action-card-footer {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-card-button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.action-card-secondary-button {
    padding: 0;
    font-size: 0.875rem;
}

/* Hover effects */
.action-card:hover .action-card-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.action-card:hover .action-card-button {
    transform: translateX(4px);
    transition: transform 0.2s ease;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .action-card {
        padding: 1rem;
    }

    .action-card-icon {
        font-size: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .action-card-title {
        font-size: 0.9375rem;
    }

    .action-card-description {
        font-size: 0.8125rem;
    }

    .action-card-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-card-footer {
        flex-direction: column;
    }

    .action-card-button {
        width: 100%;
    }
}

/* Empty state variant */
.action-card.action-card-empty-state {
    min-height: 200px;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-style: dashed;
}

.action-card.action-card-empty-state .action-card-icon {
    font-size: 3rem;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: none;
    color: #adb5bd;
}

.action-card.action-card-empty-state .action-card-title {
    font-size: 1.125rem;
}

.action-card.action-card-empty-state:hover {
    border-color: #0d6efd;
    border-style: solid;
}

/* Loading state */
.action-card.loading {
    pointer-events: none;
}

.action-card.loading .action-card-content {
    opacity: 0.5;
}

.action-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Badge overlay */
.action-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #dc3545;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.action-card-badge.badge-new {
    background: #28a745;
}

.action-card-badge.badge-warning {
    background: #ffc107;
    color: #212529;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .action-card {
        background: #343a40;
        border-color: #495057;
        color: #f8f9fa;
    }

    .action-card:hover {
        background: #3d4349;
        border-color: #0d6efd;
    }

    .action-card-title {
        color: #f8f9fa;
    }

    .action-card-description {
        color: #adb5bd;
    }

    .action-card-stat {
        color: #adb5bd;
    }

    .action-card-stat strong {
        color: #f8f9fa;
    }

    .action-card.completed {
        background: #2d3339;
    }

    .action-card.action-card-primary {
        background: linear-gradient(135deg, #1a1d20 0%, #0d3a58 100%);
    }
}

/* Print styles */
@media print {
    .action-cards-container {
        page-break-inside: avoid;
    }

    .action-card {
        border: 1px solid #000;
        box-shadow: none;
    }

    .action-card-button {
        display: none;
    }
}
