/* Payments Page Styles */

.payments-main {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 1rem 0.75rem;
  font-family: 'din-round-medium', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.payments-container {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.payment-card {
  background: white;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Payment Header */
.payment-header {
  padding: 1.2rem 1.25rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.payment-title {
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  text-align: center;
}

/* Plan Details Section */
.plan-details-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.plan-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.plan-thumbnail {
  flex-shrink: 0;
}

.course-thumbnail-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e1e5e9;
}

.plan-info {
  flex: 1;
}

.plan-name {
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.plan-duration {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0;
}

.plan-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.current-price {
  color: #2c3e50;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.original-price {
  color: #95a5a6;
  font-size: 0.85rem;
  text-decoration: line-through;
  margin: 0;
}

/* Phone Section */
.phone-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.phone-label {
  display: block;
  color: #2c3e50;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.phone-input-container {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.55rem;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.phone-input-container:focus-within {
  border-color: #3498db;
}

.country-flag {
  display: flex;
  align-items: center;
  margin-right: 0.75rem;
}

.flag-icon {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid #ddd;
  margin-right: 0.5rem;
}

.phone-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #2c3e50;
  outline: none;
  font-weight: 500;
}

.phone-input::placeholder {
  color: #95a5a6;
}

/* Name and Password Sections */
.name-section,
.password-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.input-label {
  display: block;
  color: #2c3e50;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.input-container {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.55rem;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.input-container:focus-within {
  border-color: #3498db;
}

.text-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #2c3e50;
  outline: none;
  font-weight: 500;
}

.text-input::placeholder {
  color: #95a5a6;
}

.input-container.error {
  border-color: #e74c3c;
}

/* Payment Amount Section */
.payment-amount-section {
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #f0f0f0;
}

.amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.amount-label {
  color: #2c3e50;
  font-size: 0.9rem;
  font-weight: 500;
}

.amount-value {
  color: #043016;
  background-size: cover !important;
  display: inline-block;
  margin: 0 -1em -.3em -.5em;
  padding: 0 1em .3em .9em;
  position: relative;
  background: transparent url('/assets/images/light-green.png');
}

/* Payment Methods Section */
.payment-methods-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.payment-method {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 0.25rem;
}

.payment-method:hover {
  background: #f8f9fa;
}

.payment-method[data-method="click"] input:checked ~ .radio-label,
.payment-method[data-method="click"]:has(input:checked) {
  background: #f0f9ff;
  border-color: #3498db;
}

.method-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.7rem;
  border-radius: 5px;
  background: #f8f9fa;
  padding: 0.3rem;
}

.payment-logo {
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
  border-radius: 4px;
}

.card-logos {
  display: flex;
  gap: 0.25rem;
}

.card-logo {
  width: 18px;
  height: 12px;
  object-fit: contain;
}

.method-info {
  flex: 1;
}

.method-name {
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.method-description {
  color: #7f8c8d;
  font-size: 0.85rem;
  margin: 0;
}

.method-selector {
  position: relative;
}

.method-selector input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-label {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.radio-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef6029;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.method-selector input[type="radio"]:checked + .radio-label {
  border-color: #ef6029;
}

.method-selector input[type="radio"]:checked + .radio-label::after {
  opacity: 1;
}

/* Payment Button Section */
.payment-button-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.payment-button {
  width: 100%;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'din-round-medium', sans-serif;
}

.payment-button:hover {
  background: #34495e;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(44, 62, 80, 0.3);
}

.payment-button:active {
  transform: translateY(0);
}

.button-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 3px;
}

/* Payment Footer */
.payment-footer {
  padding: 0.75rem 1rem 1rem;
  text-align: center;
}

.payment-terms {
  color: #7f8c8d;
  font-size: 0.75rem;
  margin: 0 0 0.6rem 0;
  line-height: 1.3;
}

.payment-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.footer-link {
  color: #ef6029;
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #d55525;
  text-decoration: underline;
}

.link-separator {
  color: #bdc3c7;
  font-size: 0.75rem;
}

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: #27ae60;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.security-badge i {
  font-size: 1rem;
}

/* Payment Provider Logos */
.payment-providers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.provider-logo {
  height: 12px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.provider-logo:hover {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .payments-main {
    padding: 10px;
  }
  
  .payment-card {
    border-radius: 14px;
  }
  
  .payment-header,
  .plan-details-section,
  .phone-section,
  .name-section,
  .password-section,
  .payment-amount-section,
  .payment-methods-section,
  .payment-button-section,
  .payment-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .payment-title {
    font-size: 1.1rem;
  }
  
  .plan-details-section {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .plan-content {
    gap: 0.5rem;
  }
  
  .course-thumbnail-image {
    width: 40px;
    height: 40px;
  }
  
  .plan-pricing {
    align-items: flex-start;
  }
  
  .payment-providers {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .payments-main {
    padding: 10px;
  }
  
  .payment-card {
    border-radius: 12px;
  }
  
  .payment-header,
  .plan-details-section,
  .phone-section,
  .name-section,
  .password-section,
  .payment-amount-section,
  .payment-methods-section,
  .payment-button-section,
  .payment-footer {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  
  .method-logo {
    width: 35px;
    height: 35px;
  }
  
  .payment-logo {
    max-width: 25px;
    max-height: 25px;
  }
}

/* Loading States */
.payment-button.loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

.payment-button.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error States */
.phone-input-container.error {
  border-color: #e74c3c;
}

.error-message {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: none;
  background: #fdf2f2;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.error-message.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success States */
.payment-button.success {
  background: #27ae60;
}

.payment-button.success:hover {
  background: #2ecc71;
}

/* Accessibility */
.payment-method:focus-within {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

.payment-button:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Animations */
.payment-method {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom scrollbar for mobile */
@media (max-width: 768px) {
  .payments-main::-webkit-scrollbar {
    width: 0px;
    background: transparent;
  }
} 

/* Skeleton Loading Styles */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Plan Details Skeleton */
.plan-details-skeleton {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.skeleton-plan-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.skeleton-plan-thumbnail {
  flex-shrink: 0;
}

.skeleton-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

.skeleton-plan-info {
  flex: 1;
}

.skeleton-title {
  height: 22px;
  width: 70%;
  margin-bottom: 8px;
}

.skeleton-subtitle {
  height: 16px;
  width: 50%;
}

.skeleton-plan-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.skeleton-price {
  height: 20px;
  width: 60px;
}

.skeleton-original-price {
  height: 14px;
  width: 45px;
}

/* Payment Methods Skeleton */
.payment-methods-skeleton {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.skeleton-payment-method {
  padding: 0.75rem;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skeleton-payment-method:last-child {
  margin-bottom: 0;
}

.skeleton-method-logo {
  flex-shrink: 0;
}

.skeleton-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.skeleton-method-info {
  flex: 1;
}

.skeleton-method-name {
  height: 18px;
  width: 80px;
  margin-bottom: 4px;
}

.skeleton-method-desc {
  height: 14px;
  width: 120px;
}

.skeleton-method-selector {
  flex-shrink: 0;
}

.skeleton-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* Initially hide actual sections and show skeleton */
.plan-details-section {
  display: none;
}

.payment-methods-section {
  display: none;
}

.plan-details-skeleton {
  display: flex;
}

.payment-methods-skeleton {
  display: block;
} 