/* filepath: website_sale_aplicoop/static/src/css/components/order-card.css */

/**
 * Order card (Eskaera) component styles
 */

.eskaera-order-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.eskaera-order-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid rgba(90, 103, 216, 0.12);
    border-radius: 0.75rem;
    box-shadow: 0 6px 18px rgba(28, 37, 80, 0.06);
    transition: transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 320ms, border-color 320ms,
        background 320ms;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 290px;
    height: 100%;
    cursor: pointer;
    animation: slideInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.eskaera-order-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.eskaera-order-card-link:hover .eskaera-order-card {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(90, 103, 216, 0.15), 0 0 30px rgba(90, 103, 216, 0.1);
    border: 1px solid rgba(90, 103, 216, 0.25);
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.eskaera-order-card-link:hover .eskaera-order-card::before {
    animation: shimmer 0.6s ease-in-out;
}

@keyframes shimmer {
    0% {
        left: 0;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 0;
    }
}

.eskaera-order-card .card-body {
    padding: 0.6rem 0.8rem 0 0.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.eskaera-order-card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.order-desc-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.order-desc-sm {
    font-size: 0.875rem;
    line-height: 1.4;
}

.order-desc-md {
    font-size: 0.95rem;
    line-height: 1.5;
}

.eskaera-order-card .btn {
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.6rem;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    border-radius: 6px;
    border: none !important;
    font-size: 0.85rem;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #5a67d8, #4c57bd) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.2) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    text-align: center;
    width: auto;
}

.eskaera-order-card .btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.eskaera-order-card .btn:active::before {
    width: 300px;
    height: 300px;
}

.eskaera-order-card .btn:hover {
    box-shadow: 0 8px 24px rgba(90, 103, 216, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-3px) scale(1.03);
    background: linear-gradient(135deg, #4c57bd, #3d4898) !important;
}

/* Center button within card body */
.eskaera-order-card .card-body > .btn {
    margin-left: auto;
    margin-right: auto;
}

/* Order card header spacing */
.order-card-header-spacing {
    margin-top: 0.9rem;
}

/* Order thumbnail small */
.order-thumbnail-sm {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(90, 103, 216, 0.1);
}

/* Order thumbnail medium */
.order-thumbnail-md {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Order thumbnail checkout */
.order-thumbnail-checkout,
.checkout-thumbnail {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.card-header-top {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-bottom: 0.3rem;
    height: 100px;
    overflow: hidden;
}

.card-header-top > div:last-child {
    text-align: left;
    flex: 1;
}

.card-header-top .card-title {
    margin: 0;
}

.card-badges .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.card-meta-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0.2rem auto 0 auto;
    padding: 0.6rem 0.8rem;
    border-top: 1px solid rgba(90, 103, 216, 0.08);
    background: rgba(245, 247, 255, 0.4);
    border-radius: 0 0 0.75rem 0.75rem;
    width: 100%;
}

.card-meta-compact .card-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Meta table styles for clean date display */
.meta-table {
    width: auto;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin: 0 auto;
    text-align: left;
    min-height: 160px;
    display: table;
}

.meta-table tbody {
    display: table-row-group;
}

.meta-row {
    display: table-row;
    font-size: 0.8rem;
    margin-bottom: 0;
}

.meta-label-cell {
    display: table-cell;
    padding: 0.25rem 0.6rem 0.25rem 0;
    font-weight: 600;
    color: #374151;
    text-align: right;
    vertical-align: top;
    white-space: nowrap;
}

.meta-label-cell span {
    display: inline-block;
}

.meta-value-cell {
    display: table-cell;
    padding: 0.25rem 0;
    color: #6b7280;
    text-align: left;
    vertical-align: middle;
}

.meta-value-cell .badge {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.meta-label {
    font-weight: 600;
    color: #374151;
    min-width: 85px;
}

.meta-value {
    color: #6b7280;
    flex: 1;
}

.order-badge-position {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10;
    display: flex;
}

.order-badge-custom {
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.3);
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}
