/* Birthday Corner Button */
.birthday-corner-button {
  position: fixed;
  bottom: 167px;
  right: 10px;
  z-index: 1000;
  transform: scale(0);
  display: none;
  animation: birthday-popIn 0.6s ease-out 5s forwards;
}

@keyframes birthday-popIn {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  70% {
    transform: scale(1.1) rotate(-10deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.birthday-birthday-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
  padding: 4px;
}
.birthday-birthday-btn img {
  width: 24px;
}
.birthday-birthday-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.birthday-birthday-btn:hover::before {
  transform: translateX(100%);
}

.birthday-birthday-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(255, 71, 87, 0.6);
}

.birthday-birthday-btn:active {
  transform: scale(0.95);
}

.birthday-birthday-btn .birthday-btn-icon {
  position: relative;
  z-index: 2;
  animation: birthday-bounce 2s infinite;
  width: 24px;
}

@keyframes birthday-bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(-2px);
  }
}

/* Confetti Pieces */
.confetti {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ff4757;
  animation: confetti-fall 3s linear 2;
  opacity: 0;
}

.confetti:nth-child(1) {
  left: 10%;
  background: #ff4757;
  animation-delay: 3.2s;
  animation-duration: 2.5s;
}
.confetti:nth-child(2) {
  left: 20%;
  background: #ffa502;
  animation-delay: 3.4s;
  animation-duration: 2.8s;
}
.confetti:nth-child(3) {
  left: 30%;
  background: #ff6348;
  animation-delay: 3.1s;
  animation-duration: 3.1s;
}
.confetti:nth-child(4) {
  left: 40%;
  background: #ff9ff3;
  animation-delay: 3.6s;
  animation-duration: 2.3s;
}
.confetti:nth-child(5) {
  left: 50%;
  background: #54a0ff;
  animation-delay: 3.3s;
  animation-duration: 2.9s;
}
.confetti:nth-child(6) {
  left: 60%;
  background: #5f27cd;
  animation-delay: 3.5s;
  animation-duration: 2.6s;
}
.confetti:nth-child(7) {
  left: 70%;
  background: #00d2d3;
  animation-delay: 3.7s;
  animation-duration: 3.2s;
}
.confetti:nth-child(8) {
  left: 80%;
  background: #ff3838;
  animation-delay: 3.2s;
  animation-duration: 2.4s;
}
.confetti:nth-child(9) {
  left: 90%;
  background: #ff9f43;
  animation-delay: 3.4s;
  animation-duration: 2.7s;
}
.confetti:nth-child(10) {
  left: 15%;
  background: #10ac84;
  animation-delay: 3.8s;
  animation-duration: 3s;
}
.confetti:nth-child(11) {
  left: 25%;
  background: #ee5a6f;
  animation-delay: 3.1s;
  animation-duration: 2.8s;
}
.confetti:nth-child(12) {
  left: 35%;
  background: #0084ff;
  animation-delay: 3.3s;
  animation-duration: 2.5s;
}
.confetti:nth-child(13) {
  left: 45%;
  background: #ff6b6b;
  animation-delay: 3.6s;
  animation-duration: 3.1s;
}
.confetti:nth-child(14) {
  left: 55%;
  background: #4834d4;
  animation-delay: 3.2s;
  animation-duration: 2.6s;
}
.confetti:nth-child(15) {
  left: 65%;
  background: #ff9500;
  animation-delay: 3.5s;
  animation-duration: 2.9s;
}
.confetti:nth-child(16) {
  left: 75%;
  background: #26de81;
  animation-delay: 3.4s;
  animation-duration: 2.7s;
}
.confetti:nth-child(17) {
  left: 85%;
  background: #fc5c65;
  animation-delay: 3.7s;
  animation-duration: 3s;
}
.confetti:nth-child(18) {
  left: 95%;
  background: #fed330;
  animation-delay: 3.1s;
  animation-duration: 2.4s;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(120px) rotate(720deg);
    opacity: 0;
  }
}

/* Message Bubble */
.birthday-message-bubble {
  position: absolute;
  bottom: 80px;
  right: 0;
  background: white;
  color: #2c3e50;
  padding: 15px 20px;
  border-radius: 20px 20px 5px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 280px;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  animation: birthday-bubbleSlideIn 0.8s ease-out 6s forwards;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  overflow: hidden; /* OVER FLOW CONFETTI */
}

@keyframes birthday-bubbleSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.birthday-message-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

.birthday-message-bubble .birthday-gift {
  display: inline-block;
  margin-right: 8px;
  font-size: 18px;
  animation: birthday-giftWiggle 1s ease-in-out infinite;
}

@keyframes birthday-giftWiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

.birthday-message-bubble .birthday-close-bubble {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #7f8c8d;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.birthday-close-bubble:hover {
  background: #ecf0f1;
  color: #2c3e50;
}

/* Pulse effect for attention */
.birthday-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 71, 87, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: birthday-pulse 2s infinite;
}

@keyframes birthday-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

/* Form Styles */
.birthday-form-container {
  padding: 20px;
}

.birthday-form-group {
  margin-bottom: 15px;
}

.birthday-form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #2c3e50;
}

.birthday-form-input {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #e0e6ed;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.birthday-form-input:focus {
  outline: none;
  border-color: #ff4757;
}

.birthday-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.birthday-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.birthday-submit-btn:active {
  transform: translateY(0);
}

.birthday-submit-btn.birthday-btn-loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.birthday-submit-btn.birthday-btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: birthday-spin 1s linear infinite;
}

@keyframes birthday-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.birthday-success-content {
  text-align: center;
  padding: 20px;
}

.birthday-success-icon {
  font-size: 48px;
  margin-bottom: 15px;
  animation: birthday-successPulse 1s ease-in-out;
}

@keyframes birthday-successPulse {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.birthday-success-message {
  color: #2c3e50;
  font-size: 16px;
  line-height: 1.5;
}

.birthday-privacy-link {
  color: #ff4757;
  text-decoration: none;
  font-size: 12px;
  margin-top: 10px;
  display: inline-block;
}

.birthday-privacy-link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .birthday-birthday-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .birthday-message-bubble {
    max-width: 250px;
    font-size: 13px;
    padding: 12px 16px;
    bottom: 70px;
  }

  .birthday-pulse-ring {
    width: 50px;
    height: 50px;
  }
}

/* MODAL - Section */

.birthday-special-popup .modal-dialog {
  max-width: 380px;
}

.birthday-special-popup .modal-content {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  background: #ffffff;
  color: #2c3e50;
}

.birthday-special-popup .modal-header {
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
  color: white;
  padding: 20px 20px 15px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: none;
}

.birthday-special-popup .modal-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="30" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>')
    repeat;
  animation: sparkle 20s linear infinite;
}

@keyframes sparkle {
  0% {
    transform: translateX(-50px) translateY(-50px);
  }
  100% {
    transform: translateX(50px) translateY(50px);
  }
}

.birthday-special-popup .birthday-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  display: block;
  animation: bounce 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

.birthday-special-popup .modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
  position: relative;
  z-index: 2;
}

.birthday-special-popup .popup-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
  position: relative;
  z-index: 2;
  margin: 0;
}

.birthday-special-popup .btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  opacity: 1;
  filter: none;
  z-index: 3;
  transition: all 0.3s ease;
}

.birthday-special-popup .btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.birthday-special-popup .btn-close::before {
  content: "×";
  color: white;
  font-size: 1rem;
  font-weight: 300;
}

.birthday-special-popup .modal-body {
  padding: 20px;
}

.birthday-special-popup .benefits-list {
  list-style: none;
  padding: 0;
  margin-bottom: 18px;
}

.birthday-special-popup .benefit-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 0;
}

.birthday-special-popup .benefit-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ff4757, #ff6b7d);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
}

.birthday-special-popup .benefit-text {
  color: #2c3e50;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}

.birthday-special-popup .form-label {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.birthday-special-popup .mb-3 {
  margin-bottom: 15px !important;
}

.birthday-special-popup .mb-4 {
  margin-bottom: 18px !important;
}

.birthday-special-popup .phone-input-group {
  display: flex;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.birthday-special-popup .phone-input-group:focus-within {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.birthday-special-popup .country-code {
  background: #2f3542;
  color: white;
  padding: 12px 15px;
  font-weight: 600;
  border: none;
  font-size: 0.9rem;
  margin: 0;
}

.birthday-special-popup .form-control {
  border: 2px solid #e1e2e2;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #2c3e50;
}

.birthday-special-popup .form-control:focus {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
  background: #ffffff;
}

.birthday-special-popup .form-control::placeholder {
  color: #7f8c8d;
  font-size: 0.85rem;
}

.birthday-special-popup .phone-input {
  flex: 1;
  border: none !important;
  background: transparent;
  box-shadow: none !important;
  border-radius: 0;
  color: #2c3e50;
}

.birthday-special-popup .phone-input::placeholder {
  color: #7f8c8d;
}

.birthday-special-popup .submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.birthday-special-popup .submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.birthday-special-popup .submit-btn:hover::before {
  left: 100%;
}

.birthday-special-popup .submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

.birthday-special-popup .skip-btn {
  background: none;
  border: none;
  color: #7f8c8d;
  font-size: 0.8rem;
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.birthday-special-popup .skip-btn:hover {
  color: #2c3e50;
}

.birthday-special-popup .privacy-notice {
  font-size: 0.75rem;
  color: #7f8c8d;
  text-align: center;
  margin-top: 12px;
  line-height: 1.3;
}

.birthday-special-popup .privacy-notice a {
  color: #ff4757;
  text-decoration: none;
}

.birthday-special-popup .success-content {
  text-align: center;
  padding: 15px 0;
}

.birthday-special-popup .success-icon {
  width: 60px;
  height: 60px;
  background: #2ed573;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 2rem;
  color: white;
  animation: successPop 0.6s ease-out;
}

@keyframes successPop {
  0% {
    transform: scale(0);
  }
  80% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.birthday-special-popup .success-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.birthday-special-popup .success-message {
  color: #7f8c8d;
  font-size: 0.85rem;
  line-height: 1.4;
}

.birthday-special-popup .btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

.birthday-special-popup .btn-loading .btn-text {
  opacity: 0;
}

.birthday-special-popup .btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .birthday-special-popup .modal-dialog {
    margin: 8px;
    max-width: none;
  }

  .birthday-special-popup .modal-header {
    padding: 18px 15px 12px;
  }

  .birthday-special-popup .modal-body {
    padding: 18px 15px;
  }

  .birthday-special-popup .modal-title {
    font-size: 1.2rem;
  }

  .birthday-special-popup .birthday-icon {
    font-size: 2rem;
    margin-bottom: 6px;
  }

  .birthday-special-popup .benefit-item {
    margin-bottom: 6px;
  }

  .birthday-special-popup .benefit-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    font-size: 0.7rem;
  }

  .birthday-special-popup .benefit-text {
    font-size: 0.8rem;
  }
}

/* Dark mode - Only when .dark-mode class is applied */
.dark-mode .birthday-special-popup .modal-content {
  background: #2c3e50;
  color: white;
}

.dark-mode .birthday-special-popup .phone-input-group {
  background: rgba(255, 255, 255, 0.1);
}

.dark-mode .birthday-special-popup .phone-input-group:focus-within {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

.dark-mode .birthday-special-popup .form-control {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .birthday-special-popup .form-control:focus {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.dark-mode .birthday-special-popup .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.dark-mode .birthday-special-popup .benefit-text {
  color: rgba(255, 255, 255, 0.9);
}

.dark-mode .birthday-special-popup .form-label {
  color: rgba(255, 255, 255, 0.9);
}

.dark-mode .birthday-special-popup .success-title {
  color: rgba(255, 255, 255, 0.9);
}

.dark-mode .birthday-special-popup .success-message {
  color: rgba(255, 255, 255, 0.7);
}

.dark-mode .birthday-special-popup .privacy-notice {
  color: rgba(255, 255, 255, 0.6);
}

.dark-mode .birthday-special-popup .privacy-notice a {
  color: #ff6b7d;
}

.dark-mode .birthday-special-popup .skip-btn {
  color: rgba(255, 255, 255, 0.6);
}

.dark-mode .birthday-special-popup .skip-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.dark-mode .birthday-special-popup .country-code {
  background: #1a252f;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .birthday-special-popup .phone-input {
  color: white;
}

.dark-mode .birthday-special-popup .phone-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
