/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;700&display=swap');

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Kanit', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #2D3250; /* Dark background */
  color: #F6B17A; /* Highlighted text */
}

/* Header */
header {
  padding: 20px;
  text-align: center;
  background-color: #424769; /* Header background */
  color: #FFFFFF;
}

header h1 {
  font-size: 4em;
  font-weight: 700;
  margin: 0;
}

/* Main Section */
main {
  flex: 1;
  display: flex;
  flex-direction: column; /* Stack sections vertically */
  align-items: center;
  padding: 20px;
}

#upload-section {
  text-align: center;
  padding: 30px;
  border-radius: 10px;
  background-color: #424769; /* Upload panel background */
  color: #F6B17A;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px; /* Space between upload and preview sections */
}

#upload-section h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
}

.drag-drop {
  padding: 20px;
  border-radius: 8px;
  border: 2px dashed #F6B17A;
  cursor: pointer;
  color: #F6B17A;
  margin-bottom: 20px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.drag-drop:hover {
  background-color: #7077A1;
}

.drag-drop p {
  margin: 0;
  font-size: 1em;
}

#upload-button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  background-color: #F6B17A;
  color: #2D3250;
  transition: background-color 0.3s ease;
}


#upload-button:hover {
  background-color: #7077A1;
  color: #F6B17A;
}

#export-button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  background-color: #F6B17A;
  color: #2D3250;
  transition: background-color 0.3s ease;
}

#export-button:hover {
  background-color: #7077A1;
  color: #F6B17A;
}

/* Preview Section */
#preview-section {
  text-align: center;
  background-color: white; /* White background for preview */
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 800px;
}


#preview-section p {
  font-size: 1em;
  margin-bottom: 10px;
  color: #2D3250; /* Dark text for contrast on white */
}

/* Preview Table */
.preview-table {
  margin: 0 auto;
  border-collapse: collapse;
  width: 100%;
  max-width: 800px;
  background-color: white; /* Ensure table background is consistent */
  color: #2D3250; /* Dark text for contrast */
  border: 1px solid #ccc; /* Add a border for the table */
}

.preview-table th,
.preview-table td {
  padding: 10px;
  border: 1px solid #ccc; /* Add border to all cells, including headers */
  text-align: left;
}

.preview-table th {
  background-color: #424769; /* Header background color */
  color: #F6B17A; /* Header text color */
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
}

.preview-table tr:nth-child(even) {
  background-color: #f9f9f9; /* Alternate row color for better readability */
}

.preview-table tr:hover {
  background-color: #F6B17A; /* Highlight row on hover */
  color: #2D3250;
}

/* Placeholder Text in Preview Section */
.placeholder-text {
  font-size: 1.2em;
  color: #7077A1; /* Muted color for guidance */
  margin: 20px 0;
  text-align: center;
  font-style: italic;
}

footer {
  text-align: center;
  padding: 15px 0;
  background-color: #424769;
  color: #F6B17A;
  font-size: 0.9em;
}

footer p {
  margin: 5px 0;
}

footer a {
  display: inline-block;
  margin: 0 10px;
  text-decoration: none;
  vertical-align: middle;
}

.social-icon {
  width: 32px; /* Adjust size as needed */
  height: 32px;
  vertical-align: middle;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2em;
  }

  #upload-section h2 {
    font-size: 1.5em;
  }

  #upload-button {
    font-size: 0.9em;
    padding: 8px 16px;
  }
}

/* Field Selection Panel */
#field-selection {
  margin-top: 20px;
  text-align: left;
  background-color: #F6B17A; /* Light background for contrast */
  color: #2D3250; /* Dark text for readability */
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#field-selection label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
  color: #2D3250; /* Ensure labels are readable */
}

#field-selection select, #field-selection input {
  margin-bottom: 15px;
  padding: 10px;
  width: 100%;
  max-width: 400px;
  border: 1px solid #2D3250; /* Border to match theme */
  border-radius: 5px;
  font-family: Tahoma, sans-serif; /* Match cell data font */
}

#field-selection button {
  background-color: #2D3250;
  color: #F6B17A;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

#field-selection button:hover {
  background-color: #7077A1;
  color: #F6B17A;
}

.hidden {
  display: none; /* Hide elements when not needed */
}

/* Transformation Configuration Section */
#transform-section {
  background-color: #424769; /* Secondary color */
  color: #F6B17A; /* Highlight text color */
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin-top: 20px;
}

#transform-section label {
  font-weight: bold;
  font-size: 1.2em;
  display: inline-block;
  margin: 10px 0;
}

#transform-section input {
  font-size: 1.2em;
  padding: 10px;
  width: 200px; /* Bigger text box */
  border-radius: 5px;
  border: 1px solid #F6B17A;
  margin: 10px 10px 20px 10px;
}

#transform-button {
  padding: 10px 20px;
  font-size: 1.2em;
  background-color: #F6B17A; /* Match Upload File button */
  color: #2D3250;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#transform-button:hover {
  background-color: #7077A1;
  color: #F6B17A;
}

/* Transformed Data Section */
#result-section {
  background-color: #424769; /* Secondary color */
  color: #F6B17A;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 800px;
  margin-top: 20px;
  text-align: center;
}

#result-table {
  margin-top: 20px;
}

#result-section .remark {
  font-size: 0.9em;
  color: #F6B17A;
  margin-top: 10px;
  font-style: italic;
}



