/* Modern Calculator Design - Time Zone Converter */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  line-height: 1.6;
}

/* Modern Calculator Container */
.modern-calculator {
  max-width: 750px !important;
  width: 100%;
  margin: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Calculator Header */
.calculator-header {
  background: linear-gradient(135deg, #053b7d 0%, #298bac 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.calculator-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.calculator-subtitle {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
  font-weight: 300;
}

/* Calculator Content */
.calculator-content {
  padding: 30px;
}

/* Input Section */
.input-section {
  margin-bottom: 30px;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 25px;
}

.input-grid.two-column {
  grid-template-columns: repeat(2, 1fr);
}

.input-column {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #053b7d;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #053b7d;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  color: #495057;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: white;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #053b7d;
  box-shadow: 0 0 0 3px rgba(5, 59, 125, 0.1);
}

.form-control:hover {
  border-color: #298bac;
}

/* Timezone Checklist */
.timezone-checklist {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 10px;
  background: white;
}

.checkbox-label {
  display: flex;
  align-items: center;
  padding: 8px 5px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.checkbox-label:last-child {
  border-bottom: none;
}

.checkbox-label:hover {
  background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.btn {
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-small:hover {
  background: #5a6268;
}

.btn-primary {
  background: linear-gradient(135deg, #053b7d 0%, #298bac 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(5, 59, 125, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 59, 125, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Results Section */
.results-section {
  margin-top: 30px;
}

.results-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #dee2e6;
}

.results-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #053b7d;
  text-align: center;
  margin: 0 0 25px 0;
}

/* Converted Times */
.converted-times {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.time-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  text-align: center;
  transition: all 0.3s ease;
}

.time-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.time-card.source {
  background: linear-gradient(135deg, #053b7d 0%, #298bac 100%);
  color: white;
  grid-column: 1 / -1;
}

.time-card .city {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.time-card.source .city {
  color: rgba(255, 255, 255, 0.9);
}

.time-card .time {
  font-size: 1.8rem;
  font-weight: 700;
  color: #053b7d;
  margin-bottom: 5px;
}

.time-card.source .time {
  color: white;
}

.time-card .date {
  font-size: 0.9rem;
  color: #6c757d;
}

.time-card.source .date {
  color: rgba(255, 255, 255, 0.8);
}

.time-card .offset {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 5px;
}

.time-card.source .offset {
  color: rgba(255, 255, 255, 0.7);
}

.time-card .day-diff {
  font-size: 0.8rem;
  color: #dc3545;
  margin-top: 5px;
  font-weight: 500;
}

.time-card.source .day-diff {
  color: #ffc107;
}

/* World Clock Section */
.world-clock-section,
.overlap-section,
.meeting-scheduler {
  margin-top: 25px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.world-clock-section h4,
.overlap-section h4,
.meeting-scheduler h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #053b7d;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #053b7d;
}

.world-clock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.clock-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
}

.clock-item .city-name {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 4px;
}

.clock-item .current-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: #053b7d;
}

.clock-item.night {
  background: #2c3e50;
}

.clock-item.night .city-name,
.clock-item.night .current-time {
  color: white;
}

/* Overlap Section */
.overlap-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.overlap-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overlap-label {
  width: 120px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
}

.overlap-bar {
  flex: 1;
  height: 30px;
  background: #e9ecef;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.overlap-bar .hours {
  position: absolute;
  height: 100%;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-radius: 4px;
}

.overlap-bar .hour-markers {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  box-sizing: border-box;
}

.overlap-bar .hour-marker {
  font-size: 0.65rem;
  color: #6c757d;
  line-height: 30px;
}

.overlap-info {
  text-align: center;
  padding: 10px;
  background: #d4edda;
  border-radius: 6px;
  color: #155724;
  font-weight: 500;
}

/* Meeting Scheduler */
.best-times-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.best-time-slot {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.best-time-slot.optimal {
  border-color: #28a745;
  background: #d4edda;
}

.best-time-slot .time-range {
  font-size: 1rem;
  font-weight: 600;
  color: #053b7d;
  margin-bottom: 5px;
}

.best-time-slot .quality {
  font-size: 0.8rem;
  color: #6c757d;
}

.best-time-slot.optimal .quality {
  color: #155724;
}

/* Error Message */
.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .input-grid.two-column {
    grid-template-columns: 1fr;
  }

  .converted-times {
    grid-template-columns: 1fr;
  }

  .world-clock-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .best-times-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .calculator-title {
    font-size: 1.8rem;
  }

  .calculator-content {
    padding: 20px;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .world-clock-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .best-times-grid {
    grid-template-columns: 1fr;
  }

  .overlap-label {
    width: 80px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .calculator-header {
    padding: 20px;
  }

  .calculator-title {
    font-size: 1.6rem;
  }

  .calculator-subtitle {
    font-size: 1rem;
  }

  .calculator-content {
    padding: 15px;
  }

  .input-column {
    padding: 15px;
  }

  .world-clock-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Copy Widget Section */
.copy-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.disclaimer-text {
  text-align: center;
  font-weight: 600;
  color: #053b7d;
  margin: 20px 0 10px 0;
}

#new-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.smaller-button {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

/* Override sub-container width constraints */
.sub-container {
  max-width: none !important;
  width: 100%;
  overflow: visible;
}

/* Two-column Flex layout */
body .container {
  padding: 10px 20px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

body .breadcrumb {
  flex: 0 0 100% !important;
  width: 100% !important;
  margin-bottom: 8px !important;
}

body .left-section {
  order: 1 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  float: none !important;
  margin: 0 !important;
}

body .ad-container,
body .blog-feed,
body .extra-section {
  order: 2 !important;
  flex: 0 0 320px !important;
  width: 320px !important;
  align-self: flex-start !important;
  float: none !important;
  margin: 0 !important;
}

body .left-section .content {
  padding: 0 10px !important;
  margin: 0 !important;
}

body .left-section .sub-container {
  margin-top: 0 !important;
}

@media (max-width: 1024px) {
  body .container {
    display: block !important;
  }
  body .ad-container,
  body .blog-feed,
  body .extra-section,
  body .left-section {
    width: 100% !important;
    flex: 0 0 auto !important;
  }
}

@media (min-width: 1025px) {
  body .container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 12px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 10px 15px !important;
  }

  body .left-section {
    flex: 0 1 auto !important;
    max-width: calc(100% - 340px) !important;
    min-width: 0 !important;
    order: 1 !important;
    margin: 0 !important;
    padding: 0 15px !important;
  }

  body .right-column-wrapper {
    width: 320px !important;
    flex: 0 0 320px !important;
    order: 2 !important;
    align-self: flex-start !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  body .ad-container,
  body .blog-feed,
  body .extra-section {
    width: 100% !important;
    flex: 0 0 auto !important;
    order: unset !important;
    align-self: stretch !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    color: #333;
    overflow: hidden;
  }
}

/* Article content */
.content {
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 10px !important;
}

.content h2 {
  color: #053b7d;
  margin-top: 30px;
}

.content h3 {
  color: #298bac;
  margin-top: 20px;
}

.content p {
  margin-bottom: 15px;
  color: #495057;
}
