/**
 * @file
 * Styles for Product Brochure Download functionality.
 */

/* Download Button Section */
.brochure-download-section {
  margin: 15px 0;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
}

.brochure-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  background: linear-gradient(135deg, #4a7ba7 0%, #3a6087 100%);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.brochure-download-btn:hover {
  background: linear-gradient(135deg, #3a6087 0%, #2a5077 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.brochure-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.brochure-download-btn .download-icon {
  font-size: 14px;
}

/* Address Field Styling - Each line on new line */
.company-address-field {
  margin: 10px 0;
}

.company-address-field .address-line {
  display: block;
  margin-bottom: 2px;
}

.company-address-field .address-line:last-child {
  margin-bottom: 0;
}

/* Product Categories Field */
.company-product-categories-field {
  margin: 15px 0 10px 0;
}

/* Body/Description Field - Add spacing after Product Categories */
.company-body-field {
  margin-top: 15px;
}

/* Website Link Button Styling */
.company-website-field {
  margin: 10px 0;
}

.company-website-field .btn-website-link,
a.btn-website-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background: #0066cc !important;
  border: none !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.company-website-field .btn-website-link:hover,
a.btn-website-link:hover {
  background: #0052a3 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  text-decoration: none !important;
  color: #ffffff !important;
}

.company-website-field .btn-website-link:active,
a.btn-website-link:active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  color: #ffffff !important;
}

.company-website-field .btn-website-link:visited,
a.btn-website-link:visited {
  color: #ffffff !important;
}

.company-website-field .btn-website-link .website-icon,
a.btn-website-link .website-icon {
  font-size: 12px !important;
  display: inline-block !important;
  color: #ffffff !important;
}

.company-website-field .btn-website-link .website-text,
a.btn-website-link .website-text {
  display: inline-block !important;
  color: #ffffff !important;
}

.company-website-field .btn-website-link *,
a.btn-website-link * {
  color: #ffffff !important;
}

/* Email/Redirect Modal Overlay */
#brochure-email-modal,
#website-redirect-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Modal Content */
#brochure-email-modal .modal-content,
#website-redirect-modal .modal-content {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal Header */
#brochure-email-modal .modal-header,
#website-redirect-modal .modal-header {
  background: linear-gradient(135deg, #4a7ba7 0%, #3a6087 100%);
  color: #ffffff;
  padding: 20px 25px;
  border-radius: 12px 12px 0 0;
  position: relative;
}

#brochure-email-modal .modal-header h3,
#website-redirect-modal .modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: bold;
}

/* Close Button */
.brochure-modal-close,
.website-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.brochure-modal-close:hover,
.website-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Modal Body */
#brochure-email-modal .modal-body,
#website-redirect-modal .modal-body {
  padding: 30px 25px;
}

#brochure-email-modal .modal-body p,
#website-redirect-modal .modal-body p {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: #333333;
  line-height: 1.5;
}

.brochure-choice-wrapper {
  margin-bottom: 16px;
}

.brochure-choice-intro {
  font-weight: 600;
  margin-bottom: 8px;
  color: #2f4d6f;
}

.brochure-choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.brochure-choice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e6ea;
  border-radius: 6px;
  background: #f9fbfd;
}

.brochure-choice-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brochure-choice-item label {
  margin: 0;
  font-weight: 500;
  color: #1d2d3c;
}

.brochure-choice-meta {
  font-size: 12px;
  color: #556575;
}

.brochure-choice-empty {
  font-size: 14px;
  color: #a94442;
}

#brochure-email-input {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

#brochure-email-input:focus {
  outline: none;
  border-color: #4a7ba7;
  box-shadow: 0 0 0 3px rgba(74, 123, 167, 0.1);
}

/* Error/Success Message */
.brochure-error-message {
  margin-top: 15px;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.brochure-error-message.brochure-error-message {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
}

.brochure-error-message.brochure-success-message {
  background: #efe;
  border: 1px solid #cfc;
  color: #3c3;
}

/* Modal Footer */
#brochure-email-modal .modal-footer,
#website-redirect-modal .modal-footer {
  padding: 20px 25px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Modal Buttons */
.brochure-modal-cancel,
.brochure-modal-submit,
.website-modal-cancel,
.website-modal-continue {
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brochure-modal-cancel,
.website-modal-cancel {
  background: #6c757d;
  color: #ffffff;
}

.brochure-modal-cancel:hover,
.website-modal-cancel:hover {
  background: #5a6268;
}

.brochure-modal-submit,
.website-modal-continue {
  background: linear-gradient(135deg, #4a7ba7 0%, #3a6087 100%);
  color: #ffffff;
}

.brochure-modal-submit:hover:not(:disabled),
.website-modal-continue:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a6087 0%, #2a5077 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.brochure-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.website-url-preview {
  font-size: 14px;
  color: #444444;
  word-break: break-all;
}

/* Responsive Design */
@media (max-width: 768px) {
  #brochure-email-modal .modal-content,
  #website-redirect-modal .modal-content {
    margin: 20px;
    max-width: 100%;
  }

  .brochure-download-btn {
    font-size: 16px;
    padding: 12px 24px;
  }

  #brochure-email-modal .modal-header h3,
  #website-redirect-modal .modal-header h3 {
    font-size: 20px;
  }

  #brochure-email-modal .modal-footer,
  #website-redirect-modal .modal-footer {
    flex-direction: column;
  }

  .brochure-modal-cancel,
  .brochure-modal-submit {
    width: 100%;
  }
}

/* Admin Report Filters Styling */
.brochure-report-filters {
  padding: 10px 15px !important;
}

.brochure-report-filters .details-wrapper {
  padding: 10px 0 !important;
}

.filter-date-range {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 10px;
}

.filter-date-range .filter-date-item {
  flex: 0 0 auto;
}

.filter-date-range .filter-date-item label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 13px;
}

.filter-text-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.filter-text-row .filter-text-item {
  flex: 1;
  max-width: 300px;
}

.filter-text-row .filter-text-item label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 13px;
}

.filter-text-row .filter-text-item .description {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.filter-text-row .filter-text-item input[type="text"] {
  width: 100%;
}

.brochure-report-filters .form-actions {
  margin-top: 10px;
  padding-top: 10px;
}

/* Admin Report Table Styling */
.brochure-download-report table {
  width: 100%;
  margin-top: 10px;
}

.brochure-download-report table th {
  background: #f8f9fa;
  font-weight: bold;
  padding: 12px;
  border-bottom: 2px solid #dee2e6;
}

.brochure-download-report table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dee2e6;
}

.brochure-download-report table tr:hover {
  background: #f8f9fa;
}

.brochure-download-report .pager {
  margin-top: 20px;
}

.company-email-field a:link, .company-product-categories-field a:link{
  font-weight: normal !important;
}
