/* General Body Styles */
body {
    background-color: #212121;
    color: #E0E0E0;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Main container for the content */
.main-container {
    width: 100%;
    max-width: 800px;
    padding: 20px 40px;
}

/* Header section with logo and title */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.logo {
    height: 60px;
}

header h2 {
    color: #BDBDBD;
    font-weight: 400;
    font-size: 1.6em;
    text-align: right;
}

/* Tab navigation buttons */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.tab {
    padding: 8px 25px;
    font-size: 1.4em;
    font-weight: 500;
    border: 1px solid #616161;
    border-radius: 8px;
    cursor: pointer;
    background-color: transparent;
    color: #E0E0E0;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.tab.active {
    background-color: #FBCB0A; 
    color: #212121;
    border-color: #FBCB0A;
}

.tab:not(.active):hover {
    background-color: #333;
    border-color: #9E9E9E;
}

/* Divider line */
.divider {
    border: none;
    height: 2px;
    background-color: #424242;
    margin-bottom: 40px;
}

/* Form Styles */
.measurement-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-row label {
    flex-basis: 40%;
    text-align: right;
    font-size: 1.1em;
    color: #BDBDBD;
}

.form-row input[type="text"],
.form-row input[type="number"] {
    flex-grow: 1;
    background-color: #E0E0E0;
    border: none;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1em;
    color: #212121;
    font-family: 'Montserrat', sans-serif;
}

.form-row input::placeholder {
    color: #616161;
}

/* Custom File Upload Button */
.hidden {
    display: none !important;
}

/* Main container for the drop zone */
.file-upload-wrapper {
    flex-grow: 1;
    position: relative;
    border: 2px dashed #616161;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Visual feedback for dragging a file over */
.file-upload-wrapper.drag-over {
    background-color: #2c2c2c;
    border-color: #0078D4;
}

/* The label fills the wrapper */
.file-upload-label {
    width: 100%;
    height: 100%;	
    padding: 25px;
    box-sizing: border-box; 
    display: flex;
    align-items: center;
}

/* The two main states of the content area */
.placeholder-content, .file-info-content {
    display: flex;
    flex-direction: row;      
    justify-content: center; 
    align-items: center;        
    width: 100%;
    height: 100%;
}


.placeholder-content {
    justify-content: center;
}

/* File selected state: file name on the left, clear button on the right */
.file-info-content {
    justify-content: space-between;
}

.placeholder-content p {
    margin: 0 0 0 15px;
    color: #BDBDBD;
    pointer-events: none;
}

.file-name-display {
    color: #FBCB0A;
    font-style: italic;
    font-weight: 500;
}

/* Style for the new 'clear file' button */
.clear-file-btn {
    background: #616161;
    border: none;
    color: #E0E0E0;
    width: 24px;
    height: 24px;
    border-radius: 50%; /* Makes it a circle */
    font-size: 16px;
    line-height: 24px; /* Helps center the '×' */
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-file-btn:hover {
    background: #757575;
}

/* The actual file input remains completely hidden */
#file-input {
    display: none;
}

/* Final Submit Button */
.submit-button-container {
    margin-top: 15px;
}

.create-table-btn {
    width: 100%;
    padding: 15px;
    font-size: 1em;
    font-weight: 500;
    color: #E0E0E0;
    background-color: transparent;
    border: 1px solid #616161;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.create-table-btn:hover {
    background-color: #333;
    border-color: #9E9E9E;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="date"] {
    flex-grow: 1;
    background-color: #E0E0E0;
    border: none;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1em;
    color: #212121;
    font-family: 'Montserrat', sans-serif;
}

.form-row input::placeholder {
    color: #616161;
}

/* Style for the small calendar icon in Chrome/Edge */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.3);
}

.form-row select {
    /* Step 1: Basic appearance to match other inputs */
    flex-grow: 1;
    background-color: #E0E0E0;
    border: none;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1em;
    color: #212121;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;

    /* Step 2: Remove the default browser arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Step 3: Add a custom arrow using a background image (SVG) */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23616161%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: .65em auto;
}

input[type="file"] {
    display: none;
}


/* Submit Buttons & Progress Bar */
.submit-button-container {
    margin-top: 15px;
    min-height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.create-table-btn {
    width: 100%;
    padding: 15px;
    font-size: 1em;
    font-weight: 500;
    color: #E0E0E0;
    background-color: transparent;
    border: 1px solid #616161;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.create-table-btn:hover {
    background-color: #333;
    border-color: #9E9E9E;
}

.progress-bar-container {
    width: 100%;
    text-align: center;
}

.progress-bar-text {
    margin-bottom: 8px;
    color: #BDBDBD;
    font-size: 1em;
}

.progress-bar {
    width: 100%;
    height: 40px; 
    background-color: #424242;
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #FBCB0A;
    border-radius: 6px;
    transition: width 0.5s ease-out;
}