/* Social Media Text Editor Styles */

.ftf-editor-wrapper {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
/*     background: #fff; */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ftf-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ftf-btn {
    background: #ffffff;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    cursor: pointer;
    color: #495057;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    transition: all 0.2s ease;
    user-select: none;
}

.ftf-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ftf-btn:active,
.ftf-btn-active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Special styling for specific buttons */
.ftf-btn[data-format="doublestruck"],
.ftf-btn[data-format="fraktur"],
.ftf-btn[data-format="monospace"] {
    font-size: 16px;
}

.ftf-btn[data-format="glitch"] {
    animation: glitch-btn 2s infinite;
}

@keyframes glitch-btn {
    0%, 90%, 100% { transform: translateX(0); }
    95% { transform: translateX(2px); }
}

#ftf-input {
    width: 100%;
    max-width: 100%;
    min-height: 470px;
    padding: 15px;
    font-size: 16px;
    line-height: 1.5;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #ffffff;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

#ftf-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#ftf-input::placeholder {
    color: #6c757d;
    opacity: 0.8;
}


#ftf-copy {
    background: #28a745;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#ftf-copy:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

#ftf-copy:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#ftf-copy.copied {
    background: #007bff;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


/* Responsive Design */
@media (max-width: 768px) {
  .ftf-editor-container {
    flex-direction: column;
  }

  .ftf-right {
    border-left: none;
    border-top: 1px solid #ddd;
    padding-left: 0;
    padding-top: 15px;
  }
    .ftf-editor-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .ftf-toolbar {
        gap: 6px;
        padding: 10px;
    }
    
    .ftf-btn {
        padding: 8px 12px;
        font-size: 18px;
        min-width: 32px;
        min-height: 32px;
    }
    
    #ftf-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    #ftf-output {
        font-size: 16px;
        padding: 12px;
    }
}

/* ftf Counters */
.ftf-counters {
  display: flex;
  gap: 30px;
  padding-top: 5px;
  padding-bottom: 20px;
  font-size: 20px;
}

.ftf-counters span {
  font-weight: 500;
}


#ftf-emoji-btn {
    background-color: #04205c;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
}

#ftf-emoji-btn:hover {
    background-color: #386ddf;
}


/* Make editor responsive */
.ftf-editor-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* allow wrapping on small screens */
  padding-bottom: 15px;
}

/* Desktop: 2 columns */
.ftf-left {
  flex: 2;
  min-width: 300px;
}
.ftf-right {
  flex: 1;
  min-width: 250px;
  border-left: 1px solid #ddd;
  padding-left: 15px;
}

.ftf-preview {
  border: 1px solid #ccc;
  color: #000 !important;
  background: #fff;
  height: 500px; /* Fixed height - no max-height */
  padding: 10px;
  font-family: sans-serif;
  border-radius: 4px;
  overflow: hidden; /* No scrolling on the container */
  box-sizing: border-box;
}

.ftf-card-body {
  font-size: 14px;
  flex: 1; /* Take up remaining space */
  overflow-y: auto; /* Only the body scrolls */
  overflow-x: hidden;
  padding: 5px;
  box-sizing: border-box;
  margin-bottom: 10px;
  /* white-space: pre-wrap; */
}


/* Add some styling for the scrollbar in the preview */
.ftf-preview::-webkit-scrollbar,
.ftf-card-body::-webkit-scrollbar {
  width: 8px;
}

.ftf-preview::-webkit-scrollbar-track,
.ftf-card-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.ftf-preview::-webkit-scrollbar-thumb,
.ftf-card-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.ftf-preview::-webkit-scrollbar-thumb:hover,
.ftf-card-body::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* If you want the placeholder text, add it properly */
.ftf-card-body:empty::before {
  content: "Your formatted text will appear here...";
  color: #6c757d;
  opacity: 0.7;
  font-style: italic;
}


/* Shared card styles */
.ftf-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 15px;
  background: #fff;
  font-family: sans-serif;
  height: calc(100% - 7px); /* Fill the preview container minus margins */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.ftf-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  flex-shrink: 0; /* Don't shrink */
}

.ftf-card-header span {
  font-size: 12px;
  color: #555;
}


.ftf-card-footer {
  font-size: 13px;
  color: #555;
  display: flex;
  gap: 15px;
  flex-shrink: 0; /* Don't shrink */
  margin-top: auto; /* Push to bottom if needed */
}

/* Avatar */
.ftf-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}


/* Facebook button styling */
.ftf-preview-tabs button[data-platform="facebook"] {
    background: #1877F2; /* Facebook blue */
    color: white;
    border: 1px solid #1877F2;
    margin-bottom: 10px;
    border-radius: 3px;
}

.ftf-preview-tabs button[data-platform="facebook"]:hover {
    background: #166FE5; /* Darker Facebook blue on hover */
    border-color: #166FE5;
}

