/* Main Container */
.mt4lg-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

/* Controls Area (Dropdown + Button) */
.mt4lg-controls {
    display: flex;
    flex-wrap: wrap; /* Wraps on mobile */
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

#mt4lg-datetype {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1; /* Takes available space */
    min-width: 150px;
    font-size: 14px;
}

#mt4lg-generate-btn {
    padding: 8px 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

/* Message Box */
#mt4lg-message {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Table Wrapper */
.mt4lg-table-wrapper {
    width: 100%;
    overflow-x: auto; /* Enables horizontal scroll on mobile */
    -webkit-overflow-scrolling: touch;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* Compact Table Styles */
.mt4lg-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px; /* Forces scroll if screen is smaller */
    font-size: 13px; /* Compact font */
}

.mt4lg-table th, 
.mt4lg-table td {
    padding: 8px 10px; /* Reduced padding */
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.mt4lg-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.mt4lg-table tr:last-child td {
    border-bottom: none;
}

/* Link Input Field */
.mt4lg-link-input {
    width: 100%;
    min-width: 200px;
    border: 1px solid #eee;
    background: #fdfdfd;
    padding: 4px 8px;
    font-size: 12px;
    color: #555;
    border-radius: 3px;
}

/* Action Buttons */
.mt4lg-copy-btn {
    padding: 4px 10px;
    font-size: 12px;
    background: #f0f0f1;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.mt4lg-copy-btn:hover {
    background: #e5e5e5;
}

/* Status Colors */
.mt4lg-table tr.expired td {
    background-color: #fff5f5;
    color: #999;
}

.mt4lg-table tr.expired .mt4lg-link-input {
    color: #999;
    text-decoration: line-through;
}

.mt4lg-table tr.active td {
    background-color: #fff;
    color: #333;
}

/* Pagination */
.mt4lg-pagination {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.mt4lg-pagination button {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
}

.mt4lg-pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}