/* style.css */

/* Base Styling */
body { 
    font-family: 'Poppins', sans-serif; /* Applied Font */
    max-width: 900px; 
    margin: 40px auto; 
    padding: 20px; 
    background: #f0f2f5; 
    color: #333; 
}
.container { 
    background: white; 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}
h1, h2 { 
    color: #2c3e50; 
}

/* Form Styles */
.form-group { margin-bottom: 15px; }
label { display: block; font-weight: 600; margin-bottom: 5px; color: #555; }
input[type="text"] { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }

/* Custom Button Style (Base Color: #489E45) */
button.generate-btn { 
    background: #489E45; /* Base Color */
    color: white; 
    border: none; 
    padding: 15px 30px; 
    cursor: pointer; 
    border-radius: 6px; 
    font-size: 16px; 
    width: 100%; 
    margin-top: 10px; 
    font-weight: 600; 
    transition: background-color 0.3s ease;
}
button.generate-btn:hover { 
    background: #3a8037; /* Slightly darker shade for hover effect */
}

/* Result Box */
.result-box { margin-top: 30px; padding: 20px; border: 2px solid #489E45; background: #e9f7ef; border-radius: 8px; text-align: center; }

/* Download Button Style */
.download-btn { 
    display: inline-block; 
    margin-top: 10px; 
    text-decoration: none; 
    background: #6c757d; /* Neutral color for download */
    color: white; 
    padding: 8px 16px; 
    border-radius: 4px; 
    font-weight: 600; 
}

/* Table Styles */
.history-section { margin-top: 50px; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; background: white; border-radius: 8px; overflow: hidden; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; }
th { background-color: #f8f9fa; font-weight: 700; color: #555; }
tr:hover { background-color: #f1f1f1; }

.badge { display: inline-block; padding: 4px 8px; font-size: 12px; border-radius: 4px; color: white; margin-right: 5px; }
.badge-source { background-color: #17a2b8; }
.badge-campaign { background-color: #6c757d; }

.action-link { text-decoration: none; color: #489E45; font-weight: 600; margin-right: 10px; }

/* --- Modal Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* High z-index to be on top */
    left: 0;
    top: 1vh;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 350px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#modal-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.modal-download-btn {
    display: inline-block; 
    text-decoration: none; 
    background: #489E45; /* Your base color */
    color: white; 
    padding: 8px 16px; 
    border-radius: 4px; 
    font-weight: 600; 
    transition: background-color 0.3s ease;
}

.modal-download-btn:hover {
    background: #3a8037;
}