/* PDF Signing Tool styles */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script&family=Pacifico&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f9ff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
header {
    background: linear-gradient(135deg, #a9e9a9 0%, #82d8d8 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #005f5f;
    font-size: 1.8rem;
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: #005f5f;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #003a3a;
}

nav ul li a.active {
    border-bottom: 2px solid #003a3a;
}

/* Main content styles */
main {
    padding: 2rem 0;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #e3fbf9 0%, #e8f6e8 100%);
    border-radius: 10px;
}

.hero h1 {
    color: #005f5f;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Features section */
.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.feature-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    width: 30%;
    min-width: 250px;
    margin-bottom: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box h3 {
    color: #005f5f;
    margin-bottom: 1rem;
}

/* Button styles */
.btn {
    display: inline-block;
    background-color: #e0e0e0;
    color: #333;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #d0d0d0;
}

.btn-primary {
    background-color: #70c0c0;
    color: #fff;
}

.btn-primary:hover {
    background-color: #5aa9a9;
}

.btn-success {
    background-color: #7ad87a;
    color: #fff;
}

.btn-success:hover {
    background-color: #68c668;
}

.btn-info {
    background-color: #7ab8d8;
    color: #fff;
}

.btn-info:hover {
    background-color: #6aa7c7;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #a9e9a9 0%, #82d8d8 100%);
    color: #005f5f;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer a {
    color: #005f5f;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* PDF Upload Section */
.upload-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.file-upload {
    margin: 1.5rem 0;
    position: relative;
}

.file-upload label {
    background-color: #70c0c0;
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s;
}

.file-upload label:hover {
    background-color: #5aa9a9;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.message {
    padding: 0.8rem;
    margin: 1rem 0;
    border-radius: 4px;
    background-color: #e8f6e8;
}

/* Selected file display */
.selected-file {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #e8f6e8;
    border-radius: 4px;
    display: none;
    font-weight: bold;
}

/* PDF Editor Section */
#pdf-editor {
    width: 100%;
}

.editor-toolbar {
    background-color: #f0f8f8;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tool-separator {
    width: 1px;
    height: 24px;
    background-color: #ccc;
    margin: 0 5px;
}

.editor-container {
    display: flex;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    position: relative;
}

.pdf-container {
    flex: 2;
    position: relative;
    overflow: auto;
    border-right: 1px solid #eee;
    min-height: 600px;
    max-height: 80vh;
}

#pdf-canvas {
    display: block;
    margin: 0 auto;
}

.editor-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.draggable {
    pointer-events: auto;
    cursor: move;
    border: 1px dashed transparent;
    transition: all 0.2s;
}

.draggable:hover {
    border: 1px dashed #70c0c0;
}

.tools-panel {
    flex: 1;
    padding: 1rem;
    max-width: 300px;
    min-width: 250px;
    border-left: 1px solid #eee;
}

.tool-panel {
    margin-bottom: 1.5rem;
}

.tool-panel h3 {
    color: #005f5f;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Signature Panel */
#signature-canvas {
    width: 100%;
    height: 150px;
    border: 1px solid #ccc;
    background-color: #fff;
    margin-bottom: 1rem;
}

.signature-options {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.signature-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.signature-preview {
    border: 1px solid #ccc;
    min-height: 60px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #fff;
}

#signature-preview-text {
    font-size: 24px;
    line-height: 1.2;
}

/* Text Panel */
#add-text-input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 80px;
    border: 1px solid #ccc;
}

.text-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.text-options select {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Date Panel */
#date-input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
}

.date-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.date-options select {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #005f5f;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 2rem;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

/* Active tool button */
.tool-btn.active {
    background-color: #5aa9a9;
    color: #fff;
}

/* Editor help text */
.editor-help-text {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #005f5f;
}

/* Responsive styles */
@media screen and (max-width: 992px) {
    .editor-container {
        flex-direction: column;
    }
    
    .tools-panel {
        max-width: 100%;
        border-left: none;
        border-top: 1px solid #eee;
    }
}

/* Add these to your styles.css file */

/* Element container for annotations */
.element-container {
    position: absolute;
    cursor: grab;
    padding: 5px;
    border: 1px solid transparent;
    transition: border 0.2s;
}

.element-container:hover {
    border: 1px dashed #70c0c0;
}

.element-container.dragging {
    border: 1px solid #5aa9a9;
    opacity: 0.9;
    z-index: 1000;
}

/* Delete button styles */
.delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background-color: #ff5252;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
    z-index: 10;
}

.element-container:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background-color: #ff0000;
}

/* Draggable elements */
.draggable {
    cursor: grab;
}

.dragging .draggable {
    cursor: grabbing;
}

/* Exit button */
#exit-button {
    background-color: #e74c3c;
    color: white;
    margin-left: auto;
}

#exit-button:hover {
    background-color: #c0392b;
}

@media screen and (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin: 0 0.5rem;
    }
    
    .feature-box {
        width: 100%;
    }
    
    .editor-toolbar {
        justify-content: center;
    }
}