/* Windows Phone 8 Mobile Experience CSS */

/* Hide desktop elements on mobile WP8 mode */
.wp8-mode .window,
.wp8-mode #taskbar,
.wp8-mode #start-menu {
  display: none !important;
}

/* Windows Phone 8 Mobile Layout */
.wp8-mobile-container {
  display: none; /* Hidden by default, shown when wp8-mode is active */
  background: #000;
  color: white;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

.wp8-mode .wp8-mobile-container {
  display: block;
}

/* Status Bar */
.wp8-status-bar {
  background: #000;
  height: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 400;
}

.wp8-carrier {
  font-size: 14px;
}

.wp8-time {
  font-size: 14px;
}

/* Header */
.wp8-header {
  padding: 20px 24px 10px;
  background: #000;
}

.wp8-title {
  font-size: 42px;
  font-weight: 200;
  margin: 0;
  color: white;
  line-height: 1;
}

.wp8-subtitle {
  font-size: 16px;
  font-weight: 300;
  margin: 4px 0 0;
  color: #999;
}

/* Tile Container */
.wp8-tiles-container {
  padding: 20px 24px;
  background: #000;
}

/* Tile Grid */
.wp8-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
}

/* Tile Base Styles */
.wp8-tile {
  position: relative;
  border: none;
  color: white;
  text-align: left;
  cursor: pointer;
  transition: transform 0.1s ease;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  text-decoration: none;
}

.wp8-tile:hover {
  transform: scale(0.98);
}

.wp8-tile:active {
  transform: scale(0.95);
}

/* Tile Sizes */
.wp8-tile-small {
  height: 150px;
}

.wp8-tile-wide {
  grid-column: span 2;
  height: 150px;
}

.wp8-tile-large {
  grid-column: span 2;
  height: 310px;
}

/* Tile Colors - Windows Phone 8 Accent Colors */
.wp8-tile-blue {
  background: #1ba1e2;
}

.wp8-tile-green {
  background: #339933;
}

.wp8-tile-orange {
  background: #ff7a00;
}

.wp8-tile-purple {
  background: #a200ff;
}

.wp8-tile-red {
  background: #e51400;
}

.wp8-tile-teal {
  background: #00aba9;
}

.wp8-tile-lime {
  background: #8cbf26;
}

.wp8-tile-magenta {
  background: #ff0097;
}

.wp8-tile-yellow {
  background: #ffc40d;
  color: #222;
}

/* Tile Content */
.wp8-tile-icon {
  font-size: 32px;
  margin-bottom: auto;
}

.wp8-tile-content {
  margin-top: auto;
}

.wp8-tile-title {
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.wp8-tile-subtitle {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
  line-height: 1.2;
}

.wp8-tile-count {
  font-size: 48px;
  font-weight: 200;
  margin: 0;
  line-height: 1;
}

/* Posts List Tiles */
.wp8-post-tile {
  background: #2d89ef;
  position: relative;
}

.wp8-post-date {
  font-size: 11px;
  opacity: 0.7;
  position: absolute;
  top: 12px;
  right: 12px;
}

/* Profile Tile */
.wp8-profile-tile {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  text-align: center;
  justify-content: center;
  align-items: center;
}

.wp8-profile-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 8px;
}

/* Settings/Toggle Tile */
.wp8-settings-tile {
  background: #525252;
}

/* Panorama-style horizontal scrolling for wide content */
.wp8-panorama {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.wp8-panorama-section {
  display: inline-block;
  vertical-align: top;
  white-space: normal;
  width: 80vw;
  margin-right: 20px;
}

/* Modal for post content */
.wp8-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 1000;
  display: none;
  overflow-y: auto;
}

.wp8-modal-header {
  background: #000;
  padding: 12px 24px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wp8-modal-title {
  font-size: 18px;
  font-weight: 400;
  margin: 0;
}

.wp8-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wp8-modal-content {
  padding: 24px;
  line-height: 1.6;
  color: white;
}

.wp8-modal-content h1,
.wp8-modal-content h2,
.wp8-modal-content h3 {
  color: white;
  font-weight: 300;
}

.wp8-modal-content p {
  margin-bottom: 16px;
  color: white;
}

.wp8-modal-content a {
  color: #1ba1e2;
}

/* Animation for live tiles */
@keyframes wp8-tile-flip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

.wp8-tile-animated {
  animation: wp8-tile-flip 4s infinite;
}

/* Responsive adjustments */
@media (max-width: 320px) {
  .wp8-tiles {
    gap: 4px;
  }
  
  .wp8-tile {
    padding: 12px;
  }
  
  .wp8-tile-small {
    height: 120px;
  }
  
  .wp8-tile-wide,
  .wp8-tile-large {
    height: 120px;
  }
}

/* Dark theme background for body when in WP8 mode */
.wp8-mode body {
  background: #000 !important;
  margin: 0;
  padding: 0;
}

/* Mobile responsive improvements for Windows 98 mode */
@media (max-width: 768px) {
  /* Make Windows 98 mode more usable on mobile when not in WP8 mode */
  body:not(.wp8-mode) .window {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: calc(100vw - 20px) !important;
    margin: 10px;
    height: auto !important;
    min-height: 200px;
    display: block;
  }
  
  body:not(.wp8-mode) #taskbar {
    position: fixed;
    bottom: 0;
    z-index: 1001;
  }
  
  body:not(.wp8-mode) .maximized {
    width: 100vw !important;
    height: calc(100vh - 40px) !important;
    margin: 0 !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  body:not(.wp8-mode) .portrait-image {
    max-width: 60px;
    max-height: 80px;
  }
}