|
| 1 | +/* Global styles */ |
| 2 | +body { |
| 3 | + margin: 0; /* Remove default margin */ |
| 4 | + padding: 0; /* Remove default padding */ |
| 5 | + font-family: 'Arial', sans-serif; /* Set default font family */ |
| 6 | + background: linear-gradient(135deg, #f5af19, #f12711); /* Apply gradient background */ |
| 7 | + color: #2d3436; /* Set text color */ |
| 8 | + display: flex; /* Use Flexbox for layout */ |
| 9 | + justify-content: center; /* Center horizontally */ |
| 10 | + align-items: center; /* Center vertically */ |
| 11 | + min-height: 100vh; /* Set minimum height to viewport height */ |
| 12 | + text-align: center; /* Center-align text */ |
| 13 | +} |
| 14 | + |
| 15 | +/* Main container using Flexbox */ |
| 16 | +.main-container { |
| 17 | + display: flex; /* Use Flexbox */ |
| 18 | + flex-direction: column; /* Stack items vertically */ |
| 19 | + align-items: center; /* Center items horizontally */ |
| 20 | +} |
| 21 | + |
| 22 | +/* Title styling */ |
| 23 | +.title { |
| 24 | + font-size: 48px; /* Set font size for the title */ |
| 25 | + color: #fff; /* Set text color to white */ |
| 26 | + text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* Add text shadow for readability */ |
| 27 | +} |
| 28 | + |
| 29 | +/* Description styling */ |
| 30 | +.description { |
| 31 | + font-size: 18px; /* Set font size for the description */ |
| 32 | + color: #fff; /* Set text color to white */ |
| 33 | + margin-bottom: 30px; /* Add space below the description */ |
| 34 | +} |
| 35 | + |
| 36 | +/* Search container */ |
| 37 | +.search-container { |
| 38 | + position: relative; /* Position relative for absolute positioning inside */ |
| 39 | + width: 300px; /* Set fixed width */ |
| 40 | + display: flex; /* Use Flexbox */ |
| 41 | + flex-direction: column; /* Stack items vertically */ |
| 42 | + align-items: center; /* Center items horizontally */ |
| 43 | +} |
| 44 | + |
| 45 | +/* Style the search input field */ |
| 46 | +#search-input { |
| 47 | + width: 100%; /* Set width to 100% of container */ |
| 48 | + padding: 12px 20px; /* Add padding inside the input */ |
| 49 | + font-size: 16px; /* Set font size */ |
| 50 | + border: 2px solid #ddd; /* Add border */ |
| 51 | + border-radius: 25px; /* Round the corners */ |
| 52 | + transition: border 0.3s ease; /* Add transition effect on border */ |
| 53 | +} |
| 54 | + |
| 55 | +/* Change border color on focus */ |
| 56 | +#search-input:focus { |
| 57 | + outline: none; /* Remove default outline */ |
| 58 | + border-color: #6c5ce7; /* Change border color when focused */ |
| 59 | +} |
| 60 | + |
| 61 | +/* Style the message display area */ |
| 62 | +.message-display { |
| 63 | + font-size: 24px; /* Set font size */ |
| 64 | + margin-top: 20px; /* Add space above */ |
| 65 | + color: #fff; /* Set text color to white */ |
| 66 | + min-height: 48px; /* Reserve space for the message/emoji */ |
| 67 | + display: flex; /* Use Flexbox */ |
| 68 | + align-items: center; /* Center content vertically */ |
| 69 | + justify-content: center; /* Center content horizontally */ |
| 70 | +} |
| 71 | + |
| 72 | +/* Style the suggestions dropdown */ |
| 73 | +.suggestions { |
| 74 | + position: absolute; /* Position absolutely within the container */ |
| 75 | + top: 100%; /* Position below the input field */ |
| 76 | + left: 0; /* Align to the left */ |
| 77 | + width: 100%; /* Set width to match the input */ |
| 78 | + border-radius: 0 0 25px 25px; /* Round bottom corners */ |
| 79 | + border: 2px solid #ddd; /* Add border */ |
| 80 | + border-top: none; /* Remove top border to connect with input field */ |
| 81 | + background-color: #fff; /* Set background color */ |
| 82 | + max-height: 200px; /* Set maximum height */ |
| 83 | + overflow-y: auto; /* Enable vertical scrolling */ |
| 84 | + box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Add shadow effect */ |
| 85 | + opacity: 0; /* Hide by default */ |
| 86 | + visibility: hidden; /* Hide by default */ |
| 87 | + transform: translateY(-10px); /* Move up slightly when hidden */ |
| 88 | + transition: opacity 0.3s ease, transform 0.3s ease; /* Add transition effects */ |
| 89 | + z-index: 1; /* Ensure it's above other elements */ |
| 90 | +} |
| 91 | + |
| 92 | +/* Show suggestions when active */ |
| 93 | +.suggestions.active { |
| 94 | + opacity: 1; /* Make visible */ |
| 95 | + visibility: visible; /* Make visible */ |
| 96 | + transform: translateY(0); /* Reset position */ |
| 97 | +} |
| 98 | + |
| 99 | +/* Style each suggestion item */ |
| 100 | +.suggestion-item { |
| 101 | + padding: 10px 20px; /* Add padding */ |
| 102 | + cursor: pointer; /* Change cursor on hover */ |
| 103 | + transition: background-color 0.2s ease; /* Add transition effect */ |
| 104 | +} |
| 105 | + |
| 106 | +/* Hover effect for suggestion items */ |
| 107 | +.suggestion-item:hover { |
| 108 | + background-color: #f1f1f1; /* Change background color on hover */ |
| 109 | +} |
| 110 | + |
| 111 | +/* Style for "No suggestions" message */ |
| 112 | +.no-suggestions { |
| 113 | + padding: 10px 20px; /* Add padding */ |
| 114 | + color: #888; /* Set text color */ |
| 115 | +} |
0 commit comments