/* ============================================================
   FC WC Importer V2 — Portal Frontend Styles
   Design premium Dark Mode idêntico ao V1, com suporte a físicos.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&display=swap');

.cwi-portal-wrapper {
	font-family: 'Barlow', sans-serif !important;
	box-sizing: border-box !important;
	background-color: #000 !important;
	color: #fff !important;
	padding: 40px 20px;
	border-radius: 0 !important;
	width: 100%;
}

.cwi-portal-wrapper h1,
.cwi-portal-wrapper h2,
.cwi-portal-wrapper h3,
.cwi-portal-wrapper h4,
.cwi-portal-wrapper h5,
.cwi-portal-wrapper h6 {
	font-family: 'Barlow', sans-serif !important;
}

.cwi-portal-wrapper * {
	box-sizing: border-box !important;
}

.portal-container {
	max-width: 900px;
	margin: 0 auto;
}

.portal-card {
	background: #111;
	border: 1px solid #222;
	padding: 40px;
	border-radius: 0 !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	margin-bottom: 30px;
}

.portal-card-login {
	border-radius: 0 !important;
	border: 1px solid #333 !important;
	background: #0a0a0a !important;
}

.form-group {
	margin-bottom: 20px;
}

.form-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #ccc;
	font-size: 14px;
}

.form-input {
	width: 100%;
	background: #000 !important;
	border: 1px solid #333 !important;
	color: #fff !important;
	padding: 12px 16px !important;
	border-radius: 0 !important;
	font-size: 16px !important;
	height: auto !important;
}

.form-input:focus {
	border-color: #fff !important;
	outline: none !important;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #fff !important;
	color: #000 !important;
	border: none !important;
	padding: 14px 28px !important;
	font-weight: 600 !important;
	cursor: pointer;
	text-decoration: none;
	border-radius: 0 !important;
	font-size: 16px !important;
	transition: background 0.2s;
	width: 100%;
	text-align: center;
	height: auto !important;
}

.btn:hover {
	background: #ccc !important;
}

.btn-secondary {
	background: #222 !important;
	color: #fff !important;
	border: 1px solid #333 !important;
	width: auto !important;
	padding: 8px 16px !important;
	font-size: 14px !important;
}

.btn-secondary:hover {
	background: #333 !important;
}

.alert {
	background: #222;
	border: 1px solid #333;
	padding: 16px;
	margin-bottom: 24px;
	border-radius: 0 !important;
	font-size: 14px;
	display: flex;
	align-items: flex-start !important;
	gap: 12px;
}

.alert h4 {
	margin-top: 0 !important;
	padding-top: 0 !important;
	line-height: 1 !important;
	margin-bottom: 16px !important;
}

.alert-error {
	border-color: #ff4b6e;
	color: #ff4b6e;
}

.logged-user-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #222;
	padding-bottom: 20px;
	margin-bottom: 30px;
}

.logged-user-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.logged-user-details h4 {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 2px 0;
	color: #fff;
}

.logged-user-details span {
	font-size: 13px;
	color: #888;
}

.campaign-section {
	margin-bottom: 35px;
	border: 1px solid #222;
	padding: 24px;
	border-radius: 0 !important;
	background: #080808;
}

.campaign-section--virtual {
	border-left: 4px solid #fff;
}

.campaign-section--physical {
	border-left: 4px solid #f5a623;
}

.campaign-header {
	border-bottom: 1px solid #222;
	padding-bottom: 12px;
	margin-bottom: 20px;
}

h4.campaign-title {
	font-size: 20px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 4px 0;
}

.campaign-reward-level {
	font-size: 13px;
	color: #888;
}

.downloads-flex-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	width: 100%;
}

.downloads-flex-grid .download-item-card {
	flex: 1 1 calc(50% - 8px);
	max-width: calc(50% - 8px);
	min-width: 280px;
	box-sizing: border-box;
	background: #111;
	border: 1px solid #222;
	padding: 16px;
	border-radius: 0 !important;
	display: flex;
	gap: 16px;
	align-items: center;
}

@media (max-width: 768px) {
	.downloads-flex-grid .download-item-card {
		flex: 1 1 100%;
		max-width: 100%;
	}
}

.downloads-single-item {
	display: flex;
	justify-content: center;
	width: 100%;
}

.downloads-single-item .download-item-card {
	flex: 1 1 100%;
	max-width: 400px;
	background: #111;
	border: 1px solid #222;
	padding: 24px;
	border-radius: 0 !important;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	box-sizing: border-box;
}

.downloads-single-item .download-thumb {
	width: 160px;
	height: 160px;
	border-radius: 0 !important;
	object-fit: cover;
	background: #000;
	border: 1px solid #222;
	margin-bottom: 16px;
	flex-shrink: 0;
}

.downloads-single-item .download-placeholder-thumb {
	width: 160px;
	height: 160px;
	border-radius: 0 !important;
	background: #222;
	border: 1px solid #222;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	margin-bottom: 16px;
	flex-shrink: 0;
}

.downloads-single-item .download-meta {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.downloads-single-item .download-name {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 12px;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
}

.downloads-single-item .btn-download {
	width: 100% !important;
	max-width: 180px;
}

.download-item-card {
	background: #111;
	border: 1px solid #222;
	padding: 16px;
	border-radius: 0 !important;
	display: flex;
	gap: 16px;
	align-items: center;
	box-sizing: border-box;
}

.download-thumb {
	width: 64px;
	height: 64px;
	border-radius: 0 !important;
	object-fit: cover;
	background: #000;
	border: 1px solid #222;
	flex-shrink: 0;
}

.download-placeholder-thumb {
	width: 64px;
	height: 64px;
	border-radius: 0 !important;
	background: #222;
	border: 1px solid #222;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	flex-shrink: 0;
}

.download-meta {
	flex-grow: 1;
	min-width: 0;
}

.download-name {
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	margin-bottom: 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.btn-download {
	padding: 8px 16px !important;
	font-size: 13px !important;
	width: auto !important;
}

.btn-cart {
	background: #f5a623 !important;
	color: #000 !important;
}

.btn-cart:hover {
	background: #d88e14 !important;
}

.btn-disabled {
	background: #333 !important;
	color: #666 !important;
	cursor: not-allowed !important;
}

.footer-support {
	text-align: center;
	margin-top: 40px;
	font-size: 14px;
	color: #888;
	border-top: 1px solid #222;
	padding-top: 24px;
}

.footer-support a {
	color: #fff;
	text-decoration: underline;
}

.footer-support a:hover {
	color: #ccc;
}

/* ==========================================================================
   MOBILE — layout estreito (~347px) causado pela coluna lateral vertical
   ========================================================================== */
@media only screen and (max-width: 768px) {

  /* ── Wrapper principal ── */
  .cwi-portal-wrapper {
    padding: 16px 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .portal-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ── Cards ── */
  .portal-card {
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
    border-radius: 0 !important;
  }

  /* ── Título do login ── */
  .portal-card-login h3 {
    font-size: 17px !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
  }

  /* ── Parágrafo intro ── */
  .portal-card-login>p,
  .cwi-portal-wrapper p {
    font-size: 13px !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* ── Inputs ── */
  .form-input {
    font-size: 14px !important;
    padding: 10px 12px !important;
  }

  /* ── Linha "Lembrar-me / Esqueceu a senha?" ──
     Empilha verticalmente para evitar corte */
  .form-group[style*="justify-content:space-between"],
  .form-group[style*="space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  /* ── Botão principal ── */
  .btn {
    font-size: 14px !important;
    padding: 12px 16px !important;
  }

  /* ── Botão secundário (Sair) ── */
  .btn-secondary {
    font-size: 13px !important;
    padding: 7px 12px !important;
    white-space: nowrap;
  }

  /* ── Barra de usuário logado ── */
  .logged-user-bar {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding-bottom: 14px !important;
    margin-bottom: 18px !important;
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .logged-user-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .logged-user-details h4 {
    font-size: 16px !important;
    white-space: normal !important;
    word-break: break-all !important;
    margin-bottom: 4px !important;
  }

  .logged-user-details span {
    font-size: 13px !important;
    word-break: break-all !important;
    line-height: 1.4 !important;
  }

  /* ── Seção de campanha ── */
  .campaign-section {
    padding: 14px 10px !important;
    margin-bottom: 16px !important;
  }

  .campaign-header {
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
  }

  h4.campaign-title {
    font-size: 16px !important;
  }

  .campaign-reward-level {
    font-size: 12px !important;
  }

  /* ── Título "Seus Arquivos Digitais" ── */
  .cwi-portal-wrapper h3 {
    font-size: 16px !important;
    margin-bottom: 14px !important;
  }

  /* ── Grid de downloads: força coluna única ── */
  .downloads-flex-grid {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Todos os cards viram layout coluna centralizado no mobile */
  .download-item-card,
  .downloads-flex-grid .download-item-card {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 16px 12px !important;
    gap: 10px !important;
  }

  /* ── Item único: mesmos ajustes ── */
  .downloads-single-item .download-item-card {
    max-width: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 16px 12px !important;
  }

  /* ── Thumb: tamanho uniforme em todos os cards ── */
  .download-thumb,
  .download-placeholder-thumb,
  .downloads-single-item .download-thumb,
  .downloads-single-item .download-placeholder-thumb {
    width: 92px !important;
    height: 92px !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
  }

  /* ── Meta: centraliza título e botão ── */
  .download-meta {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  /* ── Nome do arquivo: centralizado, permite quebra ── */
  .download-name {
    font-size: 13px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    text-align: center !important;
  }

  /* ── Botão de download: largura confortável para toque ── */
  .btn-download {
    font-size: 13px !important;
    padding: 9px 20px !important;
    width: auto !important;
    min-width: 120px !important;
  }

  /* ── Alert (erro / sem recompensas) ── */
  .alert {
    padding: 14px 10px !important;
    font-size: 13px !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Ícone do alert fica acima, alinhado à esquerda */
  .alert>.dashicons {
    margin-top: 0 !important;
    align-self: flex-start !important;
  }

  .alert h4 {
    font-size: 15px !important;
    margin-top: 0 !important;
  }

  /* ── Social login hook (reCAPTCHA + Google) ── */
  .cwi-social-login-hook {
    overflow: hidden !important;
  }

  .cwi-social-login-hook iframe,
  .cwi-social-login-hook>div {
    max-width: 100% !important;
  }

  .cwi-social-login-hook .g-recaptcha {
    margin: 0px !important;
    scale: .75;
    transform: translateX(-50%);
    position: relative;
    left: 25%;
  }

  /* ── Footer ── */
  .footer-support {
    font-size: 12px !important;
    margin-top: 24px !important;
  }

}
