rdowns commited on
Commit
747147a
·
verified ·
1 Parent(s): 1e40a28

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +1012 -19
  3. prompts.txt +3 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Estimator Pro
3
- emoji: 🐠
4
  colorFrom: blue
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: estimator-pro
3
+ emoji: 🐳
4
  colorFrom: blue
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1012 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Reconstruction Project Estimator</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .calculator-card {
11
+ transition: all 0.3s ease;
12
+ }
13
+ .calculator-card:hover {
14
+ transform: translateY(-3px);
15
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
16
+ }
17
+ .tab-button {
18
+ transition: all 0.2s ease;
19
+ }
20
+ .tab-button.active {
21
+ background-color: #3b82f6;
22
+ color: white;
23
+ }
24
+ .summary-item {
25
+ border-left: 4px solid #3b82f6;
26
+ }
27
+ input[type="number"]::-webkit-inner-spin-button,
28
+ input[type="number"]::-webkit-outer-spin-button {
29
+ -webkit-appearance: none;
30
+ margin: 0;
31
+ }
32
+ .profit-positive {
33
+ color: #10b981;
34
+ }
35
+ .profit-negative {
36
+ color: #ef4444;
37
+ }
38
+ .profit-neutral {
39
+ color: #6b7280;
40
+ }
41
+ </style>
42
+ </head>
43
+ <body class="bg-gray-50 min-h-screen">
44
+ <header class="bg-blue-700 text-white shadow-lg">
45
+ <div class="container mx-auto px-4 py-6">
46
+ <div class="flex flex-col md:flex-row justify-between items-center">
47
+ <div class="mb-4 md:mb-0">
48
+ <h1 class="text-3xl font-bold">Reconstruction Estimator Pro</h1>
49
+ <p class="text-blue-200 mt-1">Accurate pricing based on industry standards</p>
50
+ </div>
51
+ <div class="flex items-center space-x-4">
52
+ <button id="resetBtn" class="bg-white text-blue-700 px-4 py-2 rounded-lg font-semibold hover:bg-blue-50 transition">
53
+ <i class="fas fa-redo mr-2"></i>Reset All
54
+ </button>
55
+ <button id="printBtn" class="bg-blue-800 text-white px-4 py-2 rounded-lg font-semibold hover:bg-blue-900 transition">
56
+ <i class="fas fa-print mr-2"></i>Print Estimate
57
+ </button>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </header>
62
+
63
+ <main class="container mx-auto px-4 py-8">
64
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
65
+ <div class="lg:col-span-2">
66
+ <div class="bg-white rounded-xl shadow-md p-6 mb-6">
67
+ <h2 class="text-2xl font-bold text-gray-800 mb-4">Project Details</h2>
68
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
69
+ <div>
70
+ <label class="block text-sm font-medium text-gray-700 mb-1">Project Name</label>
71
+ <input type="text" id="projectName" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., Smith Residence Kitchen">
72
+ </div>
73
+ <div>
74
+ <label class="block text-sm font-medium text-gray-700 mb-1">Project Date</label>
75
+ <input type="date" id="projectDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
76
+ </div>
77
+ </div>
78
+ <div class="mt-4">
79
+ <label class="block text-sm font-medium text-gray-700 mb-1">Project Notes</label>
80
+ <textarea id="projectNotes" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" rows="3" placeholder="Any special considerations..."></textarea>
81
+ </div>
82
+ <div class="mt-4 grid grid-cols-1 md:grid-cols-2 gap-4">
83
+ <div>
84
+ <label class="block text-sm font-medium text-gray-700 mb-1">Contract Total ($)</label>
85
+ <input type="number" id="contractTotal" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total contract amount">
86
+ </div>
87
+ <div>
88
+ <label class="block text-sm font-medium text-gray-700 mb-1">Estimated Overhead (%)</label>
89
+ <input type="number" id="overheadPercent" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" value="15" placeholder="Overhead percentage">
90
+ </div>
91
+ </div>
92
+ </div>
93
+
94
+ <div class="bg-white rounded-xl shadow-md p-6 mb-6">
95
+ <div class="flex overflow-x-auto space-x-1 pb-2">
96
+ <button class="tab-button px-4 py-2 rounded-lg font-medium active" data-tab="maintrade">Main Trade</button>
97
+ <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="countertops">Countertops</button>
98
+ <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="flooring">Flooring</button>
99
+ <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="tile">Tile</button>
100
+ <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="showers">Showers</button>
101
+ <button class="tab-button px-4 py-2 rounded-lg font-medium" data-tab="cabinetry">Cabinetry</button>
102
+ </div>
103
+
104
+ <div id="tabContent" class="mt-4">
105
+ <!-- Main Trade Tab -->
106
+ <div class="tab-content" id="maintrade-tab">
107
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg">
108
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Main Trade Labor</h3>
109
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
110
+ <div>
111
+ <label class="block text-sm font-medium text-gray-700 mb-1">Number of Days</label>
112
+ <input type="number" id="tradeDays" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Estimated days">
113
+ </div>
114
+ <div>
115
+ <label class="block text-sm font-medium text-gray-700 mb-1">Daily Rate</label>
116
+ <select id="tradeRate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
117
+ <option value="600">$600/day (Standard)</option>
118
+ <option value="700">$700/day (Moderate)</option>
119
+ <option value="800">$800/day (Heavy Labor)</option>
120
+ </select>
121
+ </div>
122
+ </div>
123
+ <div class="mt-3 space-y-2">
124
+ <label class="inline-flex items-center">
125
+ <input type="checkbox" id="tradeMaterials" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
126
+ <span class="ml-2 text-sm text-gray-700">Add Materials Surcharge (+15%)</span>
127
+ </label>
128
+ <label class="inline-flex items-center">
129
+ <input type="checkbox" id="tradeHeavy" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
130
+ <span class="ml-2 text-sm text-gray-700">Heavy Labor (+10%)</span>
131
+ </label>
132
+ </div>
133
+ <button onclick="calculateTrade()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
134
+ <div id="tradeResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
135
+ <div class="flex justify-between">
136
+ <span class="font-medium">Estimated Cost:</span>
137
+ <span id="tradeCost" class="font-bold">$0.00</span>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ </div>
142
+
143
+ <!-- Countertops Tab -->
144
+ <div class="tab-content hidden" id="countertops-tab">
145
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
146
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Solid/Stone Countertops</h3>
147
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
148
+ <div>
149
+ <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
150
+ <input type="number" id="countertopSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
151
+ </div>
152
+ <div>
153
+ <label class="block text-sm font-medium text-gray-700 mb-1">Number of Slabs</label>
154
+ <input type="number" id="countertopSlabs" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Slab count">
155
+ </div>
156
+ </div>
157
+ <div class="mt-3 space-y-2">
158
+ <label class="inline-flex items-center">
159
+ <input type="checkbox" id="countertopDisposal" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
160
+ <span class="ml-2 text-sm text-gray-700">Disposal Needed (+$170)</span>
161
+ </label>
162
+ <label class="inline-flex items-center">
163
+ <input type="checkbox" id="countertopSubdeck" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
164
+ <span class="ml-2 text-sm text-gray-700">Sub Deck Needed (+$200)</span>
165
+ </label>
166
+ </div>
167
+ <button onclick="calculateCountertop()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
168
+ <div id="countertopResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
169
+ <div class="flex justify-between">
170
+ <span class="font-medium">Estimated Cost:</span>
171
+ <span id="countertopCost" class="font-bold">$0.00</span>
172
+ </div>
173
+ </div>
174
+ </div>
175
+
176
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg">
177
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Laminate Countertops</h3>
178
+ <div>
179
+ <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label>
180
+ <input type="number" id="laminateLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total linear feet">
181
+ </div>
182
+ <button onclick="calculateLaminate()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
183
+ <div id="laminateResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
184
+ <div class="flex justify-between">
185
+ <span class="font-medium">Estimated Cost:</span>
186
+ <span id="laminateCost" class="font-bold">$0.00</span>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ </div>
191
+
192
+ <!-- Flooring Tab -->
193
+ <div class="tab-content hidden" id="flooring-tab">
194
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
195
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Vinyl/Laminate Flooring</h3>
196
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
197
+ <div>
198
+ <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
199
+ <input type="number" id="vinylSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
200
+ </div>
201
+ <div>
202
+ <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet (Quarter Round)</label>
203
+ <input type="number" id="vinylLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
204
+ </div>
205
+ </div>
206
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-2">
207
+ <div>
208
+ <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
209
+ <input type="number" id="vinylMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
210
+ </div>
211
+ <div>
212
+ <label class="block text-sm font-medium text-gray-700 mb-1">Delivery Trips</label>
213
+ <input type="number" id="vinylTrips" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of trips">
214
+ </div>
215
+ </div>
216
+ <div class="mt-3 space-y-2">
217
+ <label class="inline-flex items-center">
218
+ <input type="checkbox" id="vinylDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
219
+ <span class="ml-2 text-sm text-gray-700">Demo Needed (+$1.50/sqft)</span>
220
+ </label>
221
+ <label class="inline-flex items-center">
222
+ <input type="checkbox" id="vinylUnderlayment" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
223
+ <span class="ml-2 text-sm text-gray-700">Underlayment Needed (+$0.75/sqft)</span>
224
+ </label>
225
+ <label class="inline-flex items-center">
226
+ <input type="checkbox" id="vinylLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-5 00 border-gray-300 rounded">
227
+ <span class="ml-2 text-sm text-gray-700">Floor Leveling Needed (+$1.50/sqft)</span>
228
+ </label>
229
+ </div>
230
+ <button onclick="calculateVinyl()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
231
+ <div id="vinylResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
232
+ <div class="flex justify-between">
233
+ <span class="font-medium">Estimated Cost:</span>
234
+ <span id="vinylCost" class="font-bold">$0.00</span>
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
240
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Hardwood Flooring</h3>
241
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
242
+ <div>
243
+ <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
244
+ <input type="number" id="woodSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
245
+ </div>
246
+ <div>
247
+ <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet (Quarter Round)</label>
248
+ <input type="number" id="woodLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
249
+ </div>
250
+ </div>
251
+ <div class="mt-2">
252
+ <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
253
+ <input type="number" id="woodMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
254
+ </div>
255
+ <div class="mt-3 space-y-2">
256
+ <label class="inline-flex items-center">
257
+ <input type="checkbox" id="woodDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
258
+ <span class="ml-2 text-sm text-gray-700">Demo Needed (+$2.00/sqft)</span>
259
+ </label>
260
+ <label class="inline-flex items-center">
261
+ <input type="checkbox" id="woodLeveling" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
262
+ <span class="ml-2 text-sm text-gray-700">Floor Leveling Needed (+$1.50/sqft)</span>
263
+ </label>
264
+ </div>
265
+ <button onclick="calculateWood()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
266
+ <div id="woodResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
267
+ <div class="flex justify-between">
268
+ <span class="font-medium">Estimated Cost:</span>
269
+ <span id="woodCost" class="font-bold">$0.00</span>
270
+ </div>
271
+ </div>
272
+ </div>
273
+
274
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg">
275
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Carpet</h3>
276
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
277
+ <div>
278
+ <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
279
+ <input type="number" id="carpetSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
280
+ </div>
281
+ <div>
282
+ <label class="block text-sm font-medium text-gray-700 mb-1">Number of Rooms</label>
283
+ <input type="number" id="carpetRooms" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of rooms">
284
+ </div>
285
+ </div>
286
+ <div class="mt-2">
287
+ <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
288
+ <input type="number" id="carpetMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
289
+ </div>
290
+ <div class="mt-3">
291
+ <label class="inline-flex items-center">
292
+ <input type="checkbox" id="carpetDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
293
+ <span class="ml-2 text-sm text-gray-700">Demo Needed (+$1.00/sqft)</span>
294
+ </label>
295
+ </div>
296
+ <button onclick="calculateCarpet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
297
+ <div id="carpetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
298
+ <div class="flex justify-between">
299
+ <span class="font-medium">Estimated Cost:</span>
300
+ <span id="carpetCost" class="font-bold">$0.00</span>
301
+ </div>
302
+ </div>
303
+ </div>
304
+ </div>
305
+
306
+ <!-- Tile Tab -->
307
+ <div class="tab-content hidden" id="tile-tab">
308
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
309
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Tile Flooring</h3>
310
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
311
+ <div>
312
+ <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
313
+ <input type="number" id="tileSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
314
+ </div>
315
+ <div>
316
+ <label class="block text-sm font-medium text-gray-700 mb-1">Material Cost ($/sqft)</label>
317
+ <input type="number" id="tileMaterialCost" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Material cost per sqft">
318
+ </div>
319
+ </div>
320
+ <div class="mt-3 space-y-2">
321
+ <label class="inline-flex items-center">
322
+ <input type="checkbox" id="tileDemo" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
323
+ <span class="ml-2 text-sm text-gray-700">Demo Needed (+$2.00/sqft)</span>
324
+ </label>
325
+ <label class="inline-flex items-center">
326
+ <input type="checkbox" id="tileSmallBath" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
327
+ <span class="ml-2 text-sm text-gray-700">Small Bathroom (+$150)</span>
328
+ </label>
329
+ </div>
330
+ <div id="tileBathLocation" class="mt-2 hidden">
331
+ <label class="block text-sm font-medium text-gray-700 mb-1">Bathroom Location</label>
332
+ <div class="flex space-x-4">
333
+ <label class="inline-flex items-center">
334
+ <input type="radio" name="bathLocation" value="main" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300">
335
+ <span class="ml-2 text-sm text-gray-700">Main Floor</span>
336
+ </label>
337
+ <label class="inline-flex items-center">
338
+ <input type="radio" name="bathLocation" value="upstairs" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300">
339
+ <span class="ml-2 text-sm text-gray-700">Upstairs</span>
340
+ </label>
341
+ </div>
342
+ </div>
343
+ <button onclick="calculateTile()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
344
+ <div id="tileResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
345
+ <div class="flex justify-between">
346
+ <span class="font-medium">Estimated Cost:</span>
347
+ <span id="tileCost" class="font-bold">$0.00</span>
348
+ </div>
349
+ </div>
350
+ </div>
351
+
352
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg">
353
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Backsplash</h3>
354
+ <div>
355
+ <label class="block text-sm font-medium text-gray-700 mb-1">Square Footage</label>
356
+ <input type="number" id="backsplashSqft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Total sqft">
357
+ </div>
358
+ <div class="mt-2">
359
+ <label class="block text-sm font-medium text-gray-700 mb-1">Complexity</label>
360
+ <select id="backsplashComplexity" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
361
+ <option value="simple">Simple (Straight runs)</option>
362
+ <option value="medium">Medium (Some cuts)</option>
363
+ <option value="complex">Complex (Many cuts/patterns)</option>
364
+ </select>
365
+ </div>
366
+ <button onclick="calculateBacksplash()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
367
+ <div id="backsplashResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
368
+ <div class="flex justify-between">
369
+ <span class="font-medium">Estimated Cost:</span>
370
+ <span id="backsplashCost" class="font-bold">$0.00</span>
371
+ </div>
372
+ </div>
373
+ </div>
374
+ </div>
375
+
376
+ <!-- Showers Tab -->
377
+ <div class="tab-content hidden" id="showers-tab">
378
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
379
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Shower Installation</h3>
380
+ <label class="block text-sm font-medium text-gray-700 mb-1">Shower Size</label>
381
+ <select id="showerSize" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
382
+ <option value="basic">Basic (3'x3')</option>
383
+ <option value="medium">Medium (3'x4')</option>
384
+ <option value="large">Large (4'x5')</option>
385
+ <option value="custom">Custom Size</option>
386
+ </select>
387
+ <div id="showerCustomSize" class="mt-2 hidden">
388
+ <label class="block text-sm font-medium text-gray-700 mb-1">Custom Dimensions (LxW in feet)</label>
389
+ <input type="text" id="showerDimensions" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., 3.5x4">
390
+ </div>
391
+ <div class="mt-3 space-y-2">
392
+ <label class="inline-flex items-center">
393
+ <input type="checkbox" id="showerDualHead" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
394
+ <span class="ml-2 text-sm text-gray-700">Dual Shower Head (+$300)</span>
395
+ </label>
396
+ <label class="inline-flex items-center">
397
+ <input type="checkbox" id="showerBench" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
398
+ <span class="ml-2 text-sm text-gray-700">Shower Bench (+$450)</span>
399
+ </label>
400
+ <label class="inline-flex items-center">
401
+ <input type="checkbox" id="showerMultipleNiches" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
402
+ <span class="ml-2 text-sm text-gray-700">Multiple Niches (+$200)</span>
403
+ </label>
404
+ </div>
405
+ <button onclick="calculateShower()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
406
+ <div id="showerResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
407
+ <div class="flex justify-between">
408
+ <span class="font-medium">Estimated Cost:</span>
409
+ <span id="showerCost" class="font-bold">$0.00</span>
410
+ </div>
411
+ </div>
412
+ </div>
413
+
414
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg mb-4">
415
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Tub Surround</h3>
416
+ <div class="space-y-2">
417
+ <label class="inline-flex items-center">
418
+ <input type="checkbox" id="tubStandard" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
419
+ <span class="ml-2 text-sm text-gray-700">Standard Tub Surround ($1200)</span>
420
+ </label>
421
+ </div>
422
+ <button onclick="calculateTub()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
423
+ <div id="tubResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
424
+ <div class="flex justify-between">
425
+ <span class="font-medium">Estimated Cost:</span>
426
+ <span id="tubCost" class="font-bold">$0.00</span>
427
+ </div>
428
+ </div>
429
+ </div>
430
+
431
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg">
432
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Shower Glass</h3>
433
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
434
+ <div>
435
+ <label class="block text-sm font-medium text-gray-700 mb-1">Glass Type</label>
436
+ <select id="glassType" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
437
+ <option value="standard">Standard Framed</option>
438
+ <option value="frameless">Frameless</option>
439
+ <option value="reinstall">Reinstall Existing</option>
440
+ </select>
441
+ </div>
442
+ <div>
443
+ <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label>
444
+ <input type="number" id="glassLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
445
+ </div>
446
+ </div>
447
+ <button onclick="calculateGlass()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
448
+ <div id="glassResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
449
+ <div class="flex justify-between">
450
+ <span class="font-medium">Estimated Cost:</span>
451
+ <span id="glassCost" class="font-bold">$0.00</span>
452
+ </div>
453
+ </div>
454
+ </div>
455
+ </div>
456
+
457
+ <!-- Cabinetry Tab -->
458
+ <div class="tab-content hidden" id="cabinetry-tab">
459
+ <div class="calculator-card bg-gray-50 p-4 rounded-lg">
460
+ <h3 class="font-bold text-lg text-gray-800 mb-3">Cabinet Repair/Installation</h3>
461
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
462
+ <div>
463
+ <label class="block text-sm font-medium text-gray-700 mb-1">Linear Feet</label>
464
+ <input type="number" id="cabinetLnft" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Linear feet">
465
+ </div>
466
+ <div>
467
+ <label class="block text-sm font-medium text-gray-700 mb-1">Number of Doors</label>
468
+ <input type="number" id="cabinetDoors" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500" placeholder="Number of doors">
469
+ </div>
470
+ </div>
471
+ <button onclick="calculateCabinet()" class="mt-4 bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">Calculate</button>
472
+ <div id="cabinetResult" class="mt-3 p-3 bg-blue-50 rounded-md hidden">
473
+ <div class="flex justify-between">
474
+ <span class="font-medium">Estimated Cost:</span>
475
+ <span id="cabinetCost" class="font-bold">$0.00</span>
476
+ </div>
477
+ </div>
478
+ </div>
479
+ </div>
480
+ </div>
481
+ </div>
482
+ </div>
483
+
484
+ <div class="lg:col-span-1">
485
+ <div class="bg-white rounded-xl shadow-md p-6 sticky top-8">
486
+ <h2 class="text-2xl font-bold text-gray-800 mb-4">Project Summary</h2>
487
+
488
+ <div class="mb-6">
489
+ <h3 class="text-lg font-semibold text-gray-700 mb-2">Financial Overview</h3>
490
+ <div class="grid grid-cols-2 gap-4">
491
+ <div class="bg-gray-50 p-3 rounded-lg">
492
+ <p class="text-sm text-gray-500">Contract Total</p>
493
+ <p id="summaryContract" class="text-xl font-bold">$0.00</p>
494
+ </div>
495
+ <div class="bg-gray-50 p-3 rounded-lg">
496
+ <p class="text-sm text-gray-500">Estimated Costs</p>
497
+ <p id="summaryCosts" class="text-xl font-bold">$0.00</p>
498
+ </div>
499
+ <div class="bg-gray-50 p-3 rounded-lg">
500
+ <p class="text-sm text-gray-500">Overhead</p>
501
+ <p id="summaryOverhead" class="text-xl font-bold">$0.00</p>
502
+ </div>
503
+ <div class="bg-gray-50 p-3 rounded-lg">
504
+ <p class="text-sm text-gray-500">Profit</p>
505
+ <p id="summaryProfit" class="text-xl font-bold">$0.00</p>
506
+ </div>
507
+ </div>
508
+ </div>
509
+
510
+ <div class="mb-6">
511
+ <h3 class="text-lg font-semibold text-gray-700 mb-2">Cost Breakdown</h3>
512
+ <div id="costItems" class="space-y-3">
513
+ <div class="text-center text-gray-500 py-4">
514
+ <i class="fas fa-calculator text-2xl mb-2"></i>
515
+ <p>Start adding items to see your cost breakdown</p>
516
+ </div>
517
+ </div>
518
+ </div>
519
+
520
+ <div class="border-t border-gray-200 pt-4">
521
+ <div class="flex justify-between items-center mb-2">
522
+ <span class="font-semibold">Total Estimated Costs:</span>
523
+ <span id="totalCosts" class="font-bold text-lg">$0.00</span>
524
+ </div>
525
+ <button onclick="updateSummary()" class="mt-4 w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition">
526
+ <i class="fas fa-sync-alt mr-2"></i>Update Summary
527
+ </button>
528
+ </div>
529
+ </div>
530
+ </div>
531
+ </div>
532
+ </main>
533
+
534
+ <script>
535
+ // Global variables to store calculated values
536
+ const calculatedItems = {
537
+ trade: 0,
538
+ countertop: 0,
539
+ laminate: 0,
540
+ vinyl: 0,
541
+ wood: 0,
542
+ carpet: 0,
543
+ tile: 0,
544
+ backsplash: 0,
545
+ shower: 0,
546
+ tub: 0,
547
+ glass: 0,
548
+ cabinet: 0
549
+ };
550
+
551
+ // Tab switching functionality
552
+ document.querySelectorAll('.tab-button').forEach(button => {
553
+ button.addEventListener('click', function() {
554
+ // Remove active class from all buttons
555
+ document.querySelectorAll('.tab-button').forEach(btn => {
556
+ btn.classList.remove('active');
557
+ });
558
+
559
+ // Add active class to clicked button
560
+ this.classList.add('active');
561
+
562
+ // Hide all tab contents
563
+ document.querySelectorAll('.tab-content').forEach(content => {
564
+ content.classList.add('hidden');
565
+ });
566
+
567
+ // Show the selected tab content
568
+ const tabId = this.getAttribute('data-tab') + '-tab';
569
+ document.getElementById(tabId).classList.remove('hidden');
570
+ });
571
+ });
572
+
573
+ // Calculate Trade Labor
574
+ function calculateTrade() {
575
+ const days = parseFloat(document.getElementById('tradeDays').value) || 0;
576
+ const rate = parseFloat(document.getElementById('tradeRate').value) || 0;
577
+ const materialsSurcharge = document.getElementById('tradeMaterials').checked;
578
+ const heavyLabor = document.getElementById('tradeHeavy').checked;
579
+
580
+ let cost = days * rate;
581
+
582
+ if (materialsSurcharge) cost *= 1.15;
583
+ if (heavyLabor) cost *= 1.10;
584
+
585
+ calculatedItems.trade = cost;
586
+
587
+ document.getElementById('tradeCost').textContent = `$${cost.toFixed(2)}`;
588
+ document.getElementById('tradeResult').classList.remove('hidden');
589
+ addCostItem('Main Trade Labor', cost);
590
+ updateSummary();
591
+ }
592
+
593
+ // Calculate Countertop
594
+ function calculateCountertop() {
595
+ const sqft = parseFloat(document.getElementById('countertopSqft').value) || 0;
596
+ const slabs = parseFloat(document.getElementById('countertopSlabs').value) || 0;
597
+ const disposal = document.getElementById('countertopDisposal').checked;
598
+ const subdeck = document.getElementById('countertopSubdeck').checked;
599
+
600
+ // Base rate per square foot plus per slab
601
+ let cost = (sqft * 45) + (slabs * 100);
602
+
603
+ // Add disposal if needed
604
+ if (disposal) cost += 170;
605
+
606
+ // Add subdeck if needed
607
+ if (subdeck) cost += 200;
608
+
609
+ calculatedItems.countertop = cost;
610
+
611
+ document.getElementById('countertopCost').textContent = `$${cost.toFixed(2)}`;
612
+ document.getElementById('countertopResult').classList.remove('hidden');
613
+ addCostItem('Solid Countertops', cost);
614
+ updateSummary();
615
+ }
616
+
617
+ // Calculate Laminate
618
+ function calculateLaminate() {
619
+ const lnft = parseFloat(document.getElementById('laminateLnft').value) || 0;
620
+
621
+ // Base rate per linear foot
622
+ const cost = lnft * 35;
623
+
624
+ calculatedItems.laminate = cost;
625
+
626
+ document.getElementById('laminateCost').textContent = `$${cost.toFixed(2)}`;
627
+ document.getElementById('laminateResult').classList.remove('hidden');
628
+ addCostItem('Laminate Countertops', cost);
629
+ updateSummary();
630
+ }
631
+
632
+ // Calculate Vinyl Flooring
633
+ function calculateVinyl() {
634
+ const sqft = parseFloat(document.getElementById('vinylSqft').value) || 0;
635
+ const lnft = parseFloat(document.getElementById('vinylLnft').value) || 0;
636
+ const materialCost = parseFloat(document.getElementById('vinylMaterialCost').value) || 0;
637
+ const trips = parseFloat(document.getElementById('vinylTrips').value) || 0;
638
+ const demo = document.getElementById('vinylDemo').checked;
639
+ const underlayment = document.getElementById('vinylUnderlayment').checked;
640
+ const leveling = document.getElementById('vinylLeveling').checked;
641
+
642
+ // Base installation cost
643
+ let cost = sqft * 2.50;
644
+
645
+ // Add material cost
646
+ cost += sqft * materialCost;
647
+
648
+ // Add quarter round
649
+ cost += lnft * 2.50;
650
+
651
+ // Add delivery trips
652
+ cost += trips * 75;
653
+
654
+ // Add demo if needed
655
+ if (demo) cost += sqft * 1.50;
656
+
657
+ // Add underlayment if needed
658
+ if (underlayment) cost += sqft * 0.75;
659
+
660
+ // Add leveling if needed
661
+ if (leveling) cost += sqft * 1.50;
662
+
663
+ calculatedItems.vinyl = cost;
664
+
665
+ document.getElementById('vinylCost').textContent = `$${cost.toFixed(2)}`;
666
+ document.getElementById('vinylResult').classList.remove('hidden');
667
+ addCostItem('Vinyl Flooring', cost);
668
+ updateSummary();
669
+ }
670
+
671
+ // Calculate Wood Flooring
672
+ function calculateWood() {
673
+ const sqft = parseFloat(document.getElementById('woodSqft').value) || 0;
674
+ const lnft = parseFloat(document.getElementById('woodLnft').value) || 0;
675
+ const materialCost = parseFloat(document.getElementById('woodMaterialCost').value) || 0;
676
+ const demo = document.getElementById('woodDemo').checked;
677
+ const leveling = document.getElementById('woodLeveling').checked;
678
+
679
+ // Base installation cost
680
+ let cost = sqft * 3.50;
681
+
682
+ // Add material cost
683
+ cost += sqft * materialCost;
684
+
685
+ // Add quarter round
686
+ cost += lnft * 3.00;
687
+
688
+ // Add demo if needed
689
+ if (demo) cost += sqft * 2.00;
690
+
691
+ // Add leveling if needed
692
+ if (leveling) cost += sqft * 1.50;
693
+
694
+ calculatedItems.wood = cost;
695
+
696
+ document.getElementById('woodCost').textContent = `$${cost.toFixed(2)}`;
697
+ document.getElementById('woodResult').classList.remove('hidden');
698
+ addCostItem('Wood Flooring', cost);
699
+ updateSummary();
700
+ }
701
+
702
+ // Calculate Carpet
703
+ function calculateCarpet() {
704
+ const sqft = parseFloat(document.getElementById('carpetSqft').value) || 0;
705
+ const rooms = parseFloat(document.getElementById('carpetRooms').value) || 0;
706
+ const materialCost = parseFloat(document.getElementById('carpetMaterialCost').value) || 0;
707
+ const demo = document.getElementById('carpetDemo').checked;
708
+
709
+ // Base installation cost
710
+ let cost = sqft * 1.75;
711
+
712
+ // Add material cost
713
+ cost += sqft * materialCost;
714
+
715
+ // Add per room charge
716
+ cost += rooms * 50;
717
+
718
+ // Add demo if needed
719
+ if (demo) cost += sqft * 1.00;
720
+
721
+ calculatedItems.carpet = cost;
722
+
723
+ document.getElementById('carpetCost').textContent = `$${cost.toFixed(2)}`;
724
+ document.getElementById('carpetResult').classList.remove('hidden');
725
+ addCostItem('Carpet', cost);
726
+ updateSummary();
727
+ }
728
+
729
+ // Calculate Tile
730
+ function calculateTile() {
731
+ const sqft = parseFloat(document.getElementById('tileSqft').value) || 0;
732
+ const materialCost = parseFloat(document.getElementById('tileMaterialCost').value) || 0;
733
+ const demo = document.getElementById('tileDemo').checked;
734
+ const smallBath = document.getElementById('tileSmallBath').checked;
735
+ const bathLocation = document.querySelector('input[name="bathLocation"]:checked')?.value;
736
+
737
+ // Base installation cost
738
+ let cost = sqft * 5.00;
739
+
740
+ // Add material cost
741
+ cost += sqft * materialCost;
742
+
743
+ // Add demo if needed
744
+ if (demo) cost += sqft * 2.00;
745
+
746
+ // Small bathroom premium
747
+ if (smallBath) {
748
+ cost += 150;
749
+ if (bathLocation === 'upstairs') cost += 100;
750
+ }
751
+
752
+ calculatedItems.tile = cost;
753
+
754
+ document.getElementById('tileCost').textContent = `$${cost.toFixed(2)}`;
755
+ document.getElementById('tileResult').classList.remove('hidden');
756
+ addCostItem('Tile Flooring', cost);
757
+ updateSummary();
758
+ }
759
+
760
+ // Calculate Backsplash
761
+ function calculateBacksplash() {
762
+ const sqft = parseFloat(document.getElementById('backsplashSqft').value) || 0;
763
+ const complexity = document.getElementById('backsplashComplexity').value;
764
+
765
+ // Base rates based on complexity
766
+ let rate;
767
+ switch(complexity) {
768
+ case 'simple': rate = 8.00; break;
769
+ case 'medium': rate = 10.00; break;
770
+ case 'complex': rate = 15.00; break;
771
+ default: rate = 8.00;
772
+ }
773
+
774
+ const cost = sqft * rate;
775
+
776
+ calculatedItems.backsplash = cost;
777
+
778
+ document.getElementById('backsplashCost').textContent = `$${cost.toFixed(2)}`;
779
+ document.getElementById('backsplashResult').classList.remove('hidden');
780
+ addCostItem('Backsplash', cost);
781
+ updateSummary();
782
+ }
783
+
784
+ // Calculate Shower
785
+ function calculateShower() {
786
+ const size = document.getElementById('showerSize').value;
787
+ const dualHead = document.getElementById('showerDualHead').checked;
788
+ const bench = document.getElementById('showerBench').checked;
789
+ const niches = document.getElementById('showerMultipleNiches').checked;
790
+
791
+ // Base rates based on size
792
+ let cost;
793
+ switch(size) {
794
+ case 'basic': cost = 2500; break;
795
+ case 'medium': cost = 3500; break;
796
+ case 'large': cost = 4500; break;
797
+ case 'custom':
798
+ const dimensions = document.getElementById('showerDimensions').value;
799
+ if (dimensions) {
800
+ const [length, width] = dimensions.split('x').map(Number);
801
+ const area = length * width;
802
+ cost = area * 100;
803
+ } else {
804
+ cost = 3000;
805
+ }
806
+ break;
807
+ default: cost = 2500;
808
+ }
809
+
810
+ // Add features
811
+ if (dualHead) cost += 300;
812
+ if (bench) cost += 450;
813
+ if (niches) cost += 200;
814
+
815
+ calculatedItems.shower = cost;
816
+
817
+ document.getElementById('showerCost').textContent = `$${cost.toFixed(2)}`;
818
+ document.getElementById('showerResult').classList.remove('hidden');
819
+ addCostItem('Shower Installation', cost);
820
+ updateSummary();
821
+ }
822
+
823
+ // Calculate Tub
824
+ function calculateTub() {
825
+ const standard = document.getElementById('tubStandard').checked;
826
+
827
+ // Base rate
828
+ const cost = standard ? 1200 : 0;
829
+
830
+ calculatedItems.tub = cost;
831
+
832
+ document.getElementById('tubCost').textContent = `$${cost.toFixed(2)}`;
833
+ document.getElementById('tubResult').classList.remove('hidden');
834
+ addCostItem('Tub Surround', cost);
835
+ updateSummary();
836
+ }
837
+
838
+ // Calculate Glass
839
+ function calculateGlass() {
840
+ const type = document.getElementById('glassType').value;
841
+ const lnft = parseFloat(document.getElementById('glassLnft').value) || 0;
842
+
843
+ // Rates based on type
844
+ let rate;
845
+ switch(type) {
846
+ case 'standard': rate = 75; break;
847
+ case 'frameless': rate = 125; break;
848
+ case 'reinstall': rate = 40; break;
849
+ default: rate = 75;
850
+ }
851
+
852
+ const cost = lnft * rate;
853
+
854
+ calculatedItems.glass = cost;
855
+
856
+ document.getElementById('glassCost').textContent = `$${cost.toFixed(2)}`;
857
+ document.getElementById('glassResult').classList.remove('hidden');
858
+ addCostItem('Shower Glass', cost);
859
+ updateSummary();
860
+ }
861
+
862
+ // Calculate Cabinet
863
+ function calculateCabinet() {
864
+ const lnft = parseFloat(document.getElementById('cabinetLnft').value) || 0;
865
+ const doors = parseFloat(document.getElementById('cabinetDoors').value) || 0;
866
+
867
+ // Base rate per linear foot plus per door
868
+ const cost = (lnft * 25) + (doors * 50);
869
+
870
+ calculatedItems.cabinet = cost;
871
+
872
+ document.getElementById('cabinetCost').textContent = `$${cost.toFixed(2)}`;
873
+ document.getElementById('cabinetResult').classList.remove('hidden');
874
+ addCostItem('Cabinet Repair', cost);
875
+ updateSummary();
876
+ }
877
+
878
+ // Add cost item to summary
879
+ function addCostItem(name, cost) {
880
+ const costItems = document.getElementById('costItems');
881
+
882
+ // Check if item already exists
883
+ const existingItem = Array.from(costItems.children).find(item => {
884
+ return item.querySelector('.item-name')?.textContent === name;
885
+ });
886
+
887
+ if (existingItem) {
888
+ // Update existing item
889
+ existingItem.querySelector('.item-cost').textContent = `$${cost.toFixed(2)}`;
890
+ } else {
891
+ // Create new item
892
+ const item = document.createElement('div');
893
+ item.className = 'summary-item pl-3 py-2';
894
+ item.innerHTML = `
895
+ <div class="flex justify-between items-center">
896
+ <span class="item-name text-gray-700">${name}</span>
897
+ <span class="item-cost font-bold">$${cost.toFixed(2)}</span>
898
+ </div>
899
+ `;
900
+ costItems.appendChild(item);
901
+ }
902
+
903
+ // Remove placeholder if present
904
+ const placeholder = costItems.querySelector('.text-center');
905
+ if (placeholder) {
906
+ costItems.removeChild(placeholder);
907
+ }
908
+ }
909
+
910
+ // Update summary calculations
911
+ function updateSummary() {
912
+ // Calculate total costs
913
+ let totalCosts = 0;
914
+ for (const key in calculatedItems) {
915
+ totalCosts += calculatedItems[key];
916
+ }
917
+
918
+ // Get contract total and overhead
919
+ const contractTotal = parseFloat(document.getElementById('contractTotal').value) || 0;
920
+ const overheadPercent = parseFloat(document.getElementById('overheadPercent').value) || 0;
921
+ const overheadAmount = contractTotal * (overheadPercent / 100);
922
+
923
+ // Calculate profit
924
+ const profit = contractTotal - totalCosts - overheadAmount;
925
+
926
+ // Update summary display
927
+ document.getElementById('summaryContract').textContent = `$${contractTotal.toFixed(2)}`;
928
+ document.getElementById('summaryCosts').textContent = `$${totalCosts.toFixed(2)}`;
929
+ document.getElementById('summaryOverhead').textContent = `$${overheadAmount.toFixed(2)}`;
930
+
931
+ // Style profit based on value
932
+ const profitElement = document.getElementById('summaryProfit');
933
+ profitElement.textContent = `$${profit.toFixed(2)}`;
934
+ profitElement.className = 'text-xl font-bold ' +
935
+ (profit > 0 ? 'profit-positive' :
936
+ profit < 0 ? 'profit-negative' : 'profit-neutral');
937
+
938
+ document.getElementById('totalCosts').textContent = `$${totalCosts.toFixed(2)}`;
939
+ }
940
+
941
+ // Reset all fields
942
+ document.getElementById('resetBtn').addEventListener('click', function() {
943
+ // Reset all input fields
944
+ document.querySelectorAll('input[type="text"], input[type="number"], input[type="date"], textarea').forEach(input => {
945
+ input.value = '';
946
+ });
947
+
948
+ // Reset checkboxes and radios
949
+ document.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(input => {
950
+ input.checked = false;
951
+ });
952
+
953
+ // Reset selects
954
+ document.querySelectorAll('select').forEach(select => {
955
+ select.selectedIndex = 0;
956
+ });
957
+
958
+ // Reset calculated items
959
+ for (const key in calculatedItems) {
960
+ calculatedItems[key] = 0;
961
+ }
962
+
963
+ // Reset results displays
964
+ document.querySelectorAll('[id$="Result"]').forEach(result => {
965
+ result.classList.add('hidden');
966
+ });
967
+
968
+ // Reset summary
969
+ document.getElementById('costItems').innerHTML = `
970
+ <div class="text-center text-gray-500 py-4">
971
+ <i class="fas fa-calculator text-2xl mb-2"></i>
972
+ <p>Start adding items to see your cost breakdown</p>
973
+ </div>
974
+ `;
975
+
976
+ // Reset summary numbers
977
+ updateSummary();
978
+ });
979
+
980
+ // Print functionality
981
+ document.getElementById('printBtn').addEventListener('click', function() {
982
+ window.print();
983
+ });
984
+
985
+ // Show/hide custom shower size field
986
+ document.getElementById('showerSize').addEventListener('change', function() {
987
+ const customSizeField = document.getElementById('showerCustomSize');
988
+ if (this.value === 'custom') {
989
+ customSizeField.classList.remove('hidden');
990
+ } else {
991
+ customSizeField.classList.add('hidden');
992
+ }
993
+ });
994
+
995
+ // Show/hide bathroom location options
996
+ document.getElementById('tileSmallBath').addEventListener('change', function() {
997
+ const bathLocationField = document.getElementById('tileBathLocation');
998
+ if (this.checked) {
999
+ bathLocationField.classList.remove('hidden');
1000
+ } else {
1001
+ bathLocationField.classList.add('hidden');
1002
+ }
1003
+ });
1004
+
1005
+ // Initialize with today's date
1006
+ document.addEventListener('DOMContentLoaded', function() {
1007
+ const today = new Date().toISOString().split('T')[0];
1008
+ document.getElementById('projectDate').value = today;
1009
+ });
1010
+ </script>
1011
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=rdowns/estimator-pro" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1012
+ </html>
prompts.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ the tabs dont work
2
+ only use English
3
+ Remove all Chinese from the code