/* ============================================ *
 * Linksforce Promotion Campaigns CSS
 * ============================================ */

/* Header & Filters */
.promotion-page-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.promotion-page-header h1 {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.promotion-filters {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-item label {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.filter-select {
    width: 200px;
    padding: 6px 30px 6px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.promotion-campaigns-wrapper {
    margin-bottom: 50px;
    min-height: 600px; /* Prevent page jumping when empty or loading */
}

/* Campaign Grid */
.campaign-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    padding: 0;
    list-style: none;
}

.campaign-grid .item {
    width: 33.3333%;
    padding: 0 15px;
    margin-bottom: 40px;
    box-sizing: border-box;
}

/* Campaign Card */
.campaign-card {
    background: #fff;
    border: none;
    border-radius: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.campaign-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%; /* Adjusted for image aspect ratio */
    background-color: #f5f5f5;
    overflow: hidden;
    margin-bottom: 15px;
}

.campaign-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.campaign-card:hover .campaign-image-wrapper img {
    transform: scale(1.03);
}

.campaign-image-wrapper .placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    text-transform: uppercase;
}

/* Campaign Info */
.campaign-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.campaign-date {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.campaign-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
}

.campaign-name a {
    color: #000;
    text-decoration: none;
}

.campaign-name a:hover {
    color: #e31837; /* MSI Red color on hover */
}

.campaign-desc {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Past Campaigns Styling overrides */
.campaign-grid .item.past .campaign-image-wrapper img {
    filter: grayscale(100%);
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 991px) {
    .campaign-grid .item {
        width: 50%;
    }
}

@media (max-width: 767px) {
    .campaign-grid .item {
        width: 100%;
    }
    .promotion-filters {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================ *
 * Promotion Detail Page CSS
 * ============================================ */
.promotion-view-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.promotion-title {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.promotion-title h1 {
    font-size: 32px;
    color: #333;
    font-weight: bold;
}

.campaign-banner {
    margin-bottom: 30px;
    text-align: center;
}

.campaign-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.campaign-date-info {
    text-align: center;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 16px;
}

.campaign-date-info .label {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
}

.campaign-date-info .value {
    color: #e31837;
    font-weight: bold;
}

.campaign-description-content {
    margin-bottom: 40px;
    line-height: 1.6;
    color: #444;
}

.campaign-description-content img {
    max-width: 100%;
    height: auto;
}

/* Claim Form Sections */
.claim-form-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.claim-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.claim-form-header h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.claim-form-header .subtitle {
    color: #777;
    font-size: 14px;
}

.form-section {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 25px 30px;
    margin-bottom: 30px;
}

.form-section .section-title {
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.form-section .section-title h3 {
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    margin: 0;
}

.form-section .section-title h3 span {
    background: #e31837;
    color: #fff;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    margin-right: 12px;
    font-weight: bold;
}

.form-section .form-list {
    margin: 0;
}

.form-section .form-list li.fields {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-section .form-list li.fields .field {
    flex: 1;
}

.form-section .form-list label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.form-section .form-list input.input-text,
.form-section .form-list select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-section .form-list input.input-text:focus,
.form-section .form-list select:focus {
    border-color: #e31837;
    outline: none;
    box-shadow: 0 0 5px rgba(227, 24, 55, 0.2);
}

.form-section .form-list .file-input {
    width: 100%;
    padding: 8px 0;
}

.terms-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 20px;
}

.terms-section .control {
    display: flex;
    align-items: center;
}

.terms-section .control input.checkbox {
    margin-right: 10px;
    margin-top: 2px;
}

.terms-section a {
    color: #e31837;
    text-decoration: underline;
    font-weight: bold;
}

.submit-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.submit-actions .required {
    display: block;
    margin-bottom: 15px;
    color: #e31837;
}

.btn-submit-claim {
    background: #e31837;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit-claim:hover {
    background: #c0142e;
}

/* Modal Styles */
.terms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.terms-modal-overlay[style*="display: flex"] {
    opacity: 1;
    visibility: visible;
}

.terms-modal {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.terms-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terms-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.terms-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
}

.terms-modal-header .close-btn:hover {
    color: #333;
}

.terms-modal-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
    color: #555;
}

.terms-modal-content h4 {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 8px;
}

.terms-modal-content h4:first-child {
    margin-top: 0;
}

.terms-modal-content p {
    margin-bottom: 15px;
    font-size: 14px;
}

.terms-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    text-align: right;
}

.terms-modal-footer .button {
    background: #e31837;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

.terms-modal-footer .button:hover {
    background: #c0142e;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-section .form-list li.fields {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-section {
        padding: 20px 15px;
    }
}
