/* Custom styles for CouponDeals */

/* Store grid styles */
.store-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.store-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    min-height: 150px;
    box-sizing: border-box;
}

.store-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.store-item img {
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.store-item span {
    font-weight: 500;
    margin-top: auto;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 2.8em; /* 2 lines */
    word-wrap: break-word;
    word-break: break-word;
}

/* Coupon card styles */
.coupon-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.coupon-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.coupon-card .store-logo {
    max-width: 80px;
    height: auto;
}

.coupon-card .badge {
    font-size: 0.9rem;
    padding: 0.5em 1em;
}

.coupon-card .get-coupon-btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

/* Copy button styles */
.copy-button {
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 90px;
}

.copy-button:hover {
    transform: scale(1.05);
}

.copy-button.copied {
    background-color: #198754;
    border-color: #198754;
}

/* Alert styles in modal */
.modal-body .alert {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.modal-body .alert-info {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.2);
    color: #084298;
}

.modal-body .alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: #997404;
}

/* Badge styles */
.badge {
    font-size: 0.8rem;
    padding: 0.35em 0.65em;
}

/* Search bar styles */
.search-bar {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* Footer styles */
footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .store-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .store-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .store-item {
        padding: 1rem;
        min-height: 130px;
        width: 100%;
    }
    
    .store-item img {
        width: 48px;
        height: 48px;
        max-width: 48px;
        max-height: 48px;
    }
    
    .store-item span {
        font-size: 0.875rem;
        line-height: 1.3;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .store-item {
        padding: 0.75rem;
        min-height: 110px;
        width: 100%;
    }
}

/* Coupon Modal Styles */
.coupon-code-box {
    background-color: #f8f9fa;
    border: 2px dashed #0d6efd;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.coupon-code-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(13, 110, 253, 0.1) 100%);
    z-index: 0;
}

.coupon-code-box code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
}

.modal-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .d-flex {
    margin-top: 0.5rem;
}

.modal-content {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.get-coupon-btn {
    transition: all 0.3s ease;
}

.get-coupon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Discount Value Styles */
.discount-value {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem;
    border-radius: 0.5rem;
    min-width: 80px;
    display: inline-block;
}

.discount-value.percentage {
    color: #198754;
    background-color: rgba(25, 135, 84, 0.1);
}

.discount-value.fixed {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.discount-value.shipping {
    color: #6f42c1;
    background-color: rgba(111, 66, 193, 0.1);
    font-size: 1.2rem;
}

.discount-value.deal {
    color: #fd7e14;
    background-color: rgba(253, 126, 20, 0.1);
} 