7
7
align-items : center;
8
8
height : 100vh ;
9
9
margin : 0 ;
10
+ padding : 0 ; /* Add padding for smaller screens */
10
11
}
11
12
12
13
.calculator-container {
@@ -17,13 +18,14 @@ body {
17
18
max-width : 400px ;
18
19
width : 100% ;
19
20
text-align : center;
20
- color : # 333 ; /* Text color aligned with the main site */
21
+ color : # 333 ;
22
+ box-sizing : border-box; /* Ensure padding is considered in width calculation */
21
23
}
22
24
23
25
h1 {
24
26
font-size : 2em ;
25
27
margin-bottom : 15px ;
26
- color : # 333 ; /* Heading color */
28
+ color : # 333 ;
27
29
}
28
30
29
31
p {
34
36
35
37
/* Form Styling */
36
38
.calculator-form .form-group {
37
- margin-bottom : 25px ; /* Add extra margin */
39
+ margin-bottom : 25px ;
38
40
margin-right : 26px ;
39
41
}
40
42
41
43
.calculator-form input {
42
44
width : 100% ;
43
- padding : 12px ;
45
+ padding : 12px ;
44
46
border-radius : 10px ;
45
47
border : 1px solid # ddd ;
46
48
box-shadow : 0 4px 10px rgba (0 , 0 , 0 , 0.05 );
47
49
transition : all 0.2s ease-in-out;
48
- font-size : 0.9em ;
49
50
}
50
51
51
52
.calculator-form input : focus {
52
53
border-color : # 333 ;
53
- box-shadow : 0 4px 12px rgba (51 , 51 , 51 , 0.2 ); /* Focus shadow adjusted */
54
+ box-shadow : 0 4px 12px rgba (51 , 51 , 51 , 0.2 );
54
55
outline : none;
55
56
}
56
57
62
63
border : none;
63
64
cursor : pointer;
64
65
font-size : 1.1em ;
65
- box-shadow : 0 4px 10px rgba (0 , 123 , 255 , 0.2 ); /* Button shadow */
66
- transition : background-color 0.3s ease, transform 0.2 s ease ;
66
+ box-shadow : 0 4px 10px rgba (0 , 123 , 255 , 0.2 );
67
+ transition : background-color 0.3s ease;
67
68
}
68
69
69
70
.calculate-btn : hover {
70
- background-color : # 007bff ; /* Hover effect on button */
71
- transform : scale (1.05 ); /* Slight animation on hover */
71
+ background-color : # 007bff ;
72
72
}
73
73
74
+ /* Result Display */
74
75
.result-display {
75
76
margin-top : 20px ;
76
77
padding : 15px ;
79
80
box-shadow : 0 2px 8px rgba (0 , 0 , 0 , 0.05 );
80
81
font-size : 1.2em ;
81
82
color : # 333 ;
82
- animation : fadeIn 0.5s ease-in-out;
83
- }
84
-
85
- @keyframes fadeIn {
86
- from {
87
- opacity : 0 ;
88
- }
89
- to {
90
- opacity : 1 ;
91
- }
92
83
}
93
84
94
85
.result-display p {
95
- margin : 0 ; /* Remove default paragraph margin */
96
- padding : 0 ; /* Ensure no padding inside the paragraph */
86
+ margin : 0 ;
87
+ padding : 0 ;
97
88
line-height : 1.5 ;
98
89
}
99
90
103
94
104
95
/* Spacer */
105
96
.spacer {
106
- height : 10px ; /* Adds space after label */
97
+ height : 10px ;
107
98
}
108
99
100
+ /* Signature Styling */
109
101
.signature {
110
- font-size : 0.9 em ;
111
- color : # 888888 ;
102
+ font-size : 0.8 em ;
103
+ color : # 888888 ;
112
104
text-align : center;
113
- margin-top : 20px ;
114
- font-style : italic;
105
+ margin-top : 20px ;
106
+ font-style : italic;
115
107
}
116
108
117
109
.signature-link {
118
- color : # 888888 ;
119
- text-decoration : none;
120
- font-style : italic;
110
+ color : # 888888 ;
111
+ text-decoration : none;
112
+ font-style : italic;
121
113
}
122
114
123
115
.signature-link : hover {
124
- color : # F86709 ;
116
+ color : # F86709 ;
125
117
}
126
118
127
- /* Input and Button Width */
128
- .calculator-form input ,
129
- .calculate-btn {
130
- width : 100% ;
131
- }
119
+ /* Mobile Responsiveness */
120
+ @media only screen and (max-width : 600px ) {
121
+ body {
122
+ padding : 10px ;
123
+ height : 100vh ; /* Ensure full height is used for centering */
124
+ }
132
125
133
- /* Accessibility and Focus States */
134
- .calculator-form input : focus ,
135
- .calculate-btn : focus {
136
- outline : none;
126
+ .calculator-container {
127
+ max-width : 100% ;
128
+ padding : 20px ;
129
+ margin : auto; /* Center the container horizontally */
130
+ }
131
+
132
+ h1 {
133
+ font-size : 1.5em ;
134
+ }
135
+
136
+ p {
137
+ font-size : 1em ;
138
+ }
139
+
140
+ .calculator-form input {
141
+ font-size : 1em ;
142
+ padding : 10px ;
143
+ }
144
+
145
+ .calculate-btn {
146
+ font-size : 1em ;
147
+ padding : 10px 15px ;
148
+ }
149
+
150
+ .result-display {
151
+ font-size : 1em ;
152
+ padding : 12px ;
153
+ }
154
+
155
+ .signature {
156
+ font-size : 0.7em ;
157
+ }
137
158
}
0 commit comments