|
| 1 | +/* |
| 2 | +popup-base.css |
| 3 | +Version: 1.0 |
| 4 | +
|
| 5 | +This file is responsible for the base styles of the Max Extension Settings popup. |
| 6 | +It defines the overall visual foundation including root variables, global body styles, |
| 7 | +container centering, section styling, and heading (h2) styles. |
| 8 | +These rules set up the basic typography, spacing, and color scheme for the interface. |
| 9 | +*/ |
| 10 | + |
| 11 | +/* ------------------------------------------------------------------------- */ |
| 12 | +/* Root Variables for Consistent Styling */ |
| 13 | +/* ------------------------------------------------------------------------- */ |
| 14 | +:root { |
| 15 | + --primary-color: #7a5cc8; /* Less saturated violet shade for titles and accents */ |
| 16 | + --danger-color: #a94442; /* Soft red for danger buttons */ |
| 17 | + --border-color: #ccc; /* Light gray for borders */ |
| 18 | + --bg-color: #f9f9f9; /* Very light gray for background */ |
| 19 | + --text-color: #333; /* Dark gray for primary text */ |
| 20 | + --separator-color: #bbb; /* Medium gray for separators */ |
| 21 | + --hover-bg-color: #e6e6e6; /* Light gray on hover */ |
| 22 | + --transition-duration: 0.3s; /* Standard transition duration */ |
| 23 | + --transition-duration-release: 0.4s; /* Slower transition duration for release */ |
| 24 | + --box-shadow: 0 2px 4px rgba(0,0,0,0.05); |
| 25 | + --box-shadow-hover: 0 4px 8px rgba(0,0,0,0.1); |
| 26 | + --checkbox-size: 18px; |
| 27 | + --toast-bg-color: rgba(0, 0, 0, 0.8); |
| 28 | + --toast-text-color: #fff; |
| 29 | + --toast-padding: 12px 24px; |
| 30 | + --toast-border-radius: 4px; |
| 31 | + --toast-margin: 8px; |
| 32 | + --toast-transition: opacity 0.5s ease, transform 0.5s ease; |
| 33 | +} |
| 34 | + |
| 35 | +/* ------------------------------------------------------------------------- */ |
| 36 | +/* Global Body Styles */ |
| 37 | +/* ------------------------------------------------------------------------- */ |
| 38 | +body { |
| 39 | + margin: 0; |
| 40 | + padding: 16px; |
| 41 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
| 42 | + background: var(--bg-color); |
| 43 | + color: var(--text-color); |
| 44 | + width: 100%; |
| 45 | + box-sizing: border-box; |
| 46 | + overflow-y: auto; |
| 47 | + transition: background-color var(--transition-duration) ease; |
| 48 | +} |
| 49 | + |
| 50 | +/* Hide version container when the user is adding or copying a profile */ |
| 51 | +body:has(#addProfileContainer:not([style*="display: none"])) #versionContainer, |
| 52 | +body:has(#copyProfileContainer:not([style*="display: none"])) #versionContainer { |
| 53 | + opacity: 0; |
| 54 | + transition: opacity 0.4s ease; |
| 55 | +} |
| 56 | + |
| 57 | +/* Show version container when not in profile add/copy mode */ |
| 58 | +#versionContainer { |
| 59 | + opacity: 1; |
| 60 | + pointer-events: auto; |
| 61 | + transition: opacity 0.5s ease; |
| 62 | +} |
| 63 | + |
| 64 | +/* Centered version text styling */ |
| 65 | +#version { |
| 66 | + text-align: center; |
| 67 | + color: #666666; |
| 68 | + width: 100%; |
| 69 | +} |
| 70 | + |
| 71 | +/* Explanation text styling */ |
| 72 | +#topExplanationText { |
| 73 | + text-align: center; |
| 74 | + color: #666666; |
| 75 | + width: 100%; |
| 76 | +} |
| 77 | + |
| 78 | +/* ------------------------------------------------------------------------- */ |
| 79 | +/* Container & Section Styles */ |
| 80 | +/* ------------------------------------------------------------------------- */ |
| 81 | + |
| 82 | +/* Container to Center Content */ |
| 83 | +.container { |
| 84 | + max-width: 800px; |
| 85 | + min-width: 700px; |
| 86 | + margin: 0 auto; |
| 87 | + height: 100%; |
| 88 | + display: flex; |
| 89 | + flex-direction: column; |
| 90 | + justify-content: space-between; |
| 91 | + scroll-behavior: smooth; |
| 92 | +} |
| 93 | + |
| 94 | +/* Sections Styling: Boxes that wrap content areas */ |
| 95 | +.section { |
| 96 | + margin-bottom: 24px; |
| 97 | + border: 1px solid var(--border-color); |
| 98 | + border-radius: 8px; |
| 99 | + padding: 16px; |
| 100 | + background-color: #ffffff; |
| 101 | + box-shadow: var(--box-shadow); |
| 102 | + transition: box-shadow var(--transition-duration) ease, background-color var(--transition-duration) ease; |
| 103 | +} |
| 104 | + |
| 105 | +/* Section Hover Effects: Enhance shadow and background on hover */ |
| 106 | +.section:hover { |
| 107 | + box-shadow: var(--box-shadow-hover); |
| 108 | + background-color: #f2f2f2; |
| 109 | + transition: box-shadow var(--transition-duration-release) ease, background-color var(--transition-duration-release) ease; |
| 110 | +} |
| 111 | + |
| 112 | +/* Additional text spacing within sections */ |
| 113 | +.text-inside-container { |
| 114 | + margin: 0 2rem; |
| 115 | +} |
| 116 | + |
| 117 | +/* ------------------------------------------------------------------------- */ |
| 118 | +/* Headings (h2) Styles */ |
| 119 | +/* ------------------------------------------------------------------------- */ |
| 120 | + |
| 121 | +/* Primary headings for each section */ |
| 122 | +h2 { |
| 123 | + margin: 0 0 16px 0; |
| 124 | + font-size: 16px; |
| 125 | + font-weight: 600; |
| 126 | + color: var(--primary-color); |
| 127 | + transition: color var(--transition-duration) ease; |
| 128 | +} |
| 129 | + |
| 130 | +/* Hover effect for headings for subtle feedback */ |
| 131 | +h2:hover { |
| 132 | + color: #6a4abd; |
| 133 | + transition: color var(--transition-duration-release) ease; |
| 134 | +} |
0 commit comments