File size: 3,536 Bytes
73566f6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
/* auth-card layout: side-by-side faces that slide horizontally */
:host { display: block; }
.auth-popup { display:flex; align-items:center; justify-content:center; }
.auth-card {
width: 100%;
max-width: 900px;
margin: 0 auto;
border-radius: 18px;
overflow: hidden;
box-sizing: border-box;
}
/* inner holds both faces side-by-side (200% width) */
.card-inner {
width: 200%;
height: 620px;
display: flex; /* place front and back side-by-side */
transition: transform 0.6s cubic-bezier(.22,.9,.32,1);
will-change: transform;
}
/* When flipped, slide to show back face */
.auth-card.flipped .card-inner {
transform: translate3d(-50%, 0, 0);
}
.auth-card:not(.flipped) .card-inner {
transform: translate3d(0, 0, 0);
}
/* Each face takes 50% of inner width */
.card-front, .card-back {
width: 50%;
height: 100%;
flex: 0 0 50%;
box-sizing: border-box;
position: relative;
overflow: hidden;
}
@media (max-width: 900px) {
.card-inner { width: 200%; height: auto; flex-direction: column; }
.card-front, .card-back { width: 100%; height: auto; flex: 0 0 auto; }
}
/* Layout inside each face: side-panel + main-panel split */
.card-content { display: flex; height: 100%;flex-direction:row-reverse; }
.side-panel { flex: 0 0 auto; position: relative; overflow: hidden; }
.main-panel { flex: 1 1 auto; padding: 6px 8px; box-sizing: border-box; background:#fff; overflow: auto; }
/* --- Per-face explicit sizes (FRONT: 48% / 47%) --- */
.card-front .side-panel.side-left { flex: 0 0 48%; max-width: 48%; }
.card-front .main-panel { flex: 0 0 47%; max-width: 47%; }
.card-front .side-panel.side-right { flex: 0 0 auto; }
/* Front face coloring */
.card-front .side-panel.side-left { background: linear-gradient(135deg,#ff416c 0%,#ff4b2b 100%); }
.card-front .side-panel.side-right { background: #ffffff; }
/* --- Per-face explicit sizes (BACK: 35% / 65%) --- */
.card-back .side-panel.side-left { flex: 0 0 35%; max-width: 35%; }
.card-back .main-panel { flex: 0 0 65%; max-width: 65%; }
.card-back .side-panel.side-right { flex: 0 0 auto; }
/* Back face coloring */
.card-back .side-panel.side-left { background: #ffffff; }
.card-back .side-panel.side-right { background: linear-gradient(135deg,#ff416c 0%,#ff4b2b 100%); }
/* Text color rules to ensure good contrast depending on panel */
.card-front .side-panel.side-left .side-inner,
.card-back .side-panel.side-right .side-inner { color: #fff; }
.card-front .side-panel.side-right .side-inner,
.card-back .side-panel.side-left .side-inner { color: #222; }
/* Ensure main panel text is dark on white backgrounds */
.card-front .main-panel, .card-back .main-panel { background: #fff; color: #222; }
/* Keep image behavior inside side panels */
.side-panel .side-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
/* overlay and layering */
.card-front .side-panel.side-left::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.12)); pointer-events: none; z-index: 1; }
.card-front .side-panel.side-left .side-inner { position: relative; z-index: 2; padding: 24px; }
/* responsive adjustments */
@media (max-width: 700px) {
.card-content { flex-direction: column; }
.card-front .side-panel.side-left, .card-back .side-panel.side-left { flex: 0 0 auto; height: 220px; max-width: none; }
.card-front .main-panel, .card-back .main-panel { flex: 0 0 auto; }
.card-front .side-panel.side-left::before { display: none; }
}
|